This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 1b33f8cfd67 branch-2.1: [fix](hudi) Set Spark Hudi JNI scanner as 
default (#48602) (#48606)
1b33f8cfd67 is described below

commit 1b33f8cfd673d6d458c0e0393566ef620cbf9640
Author: Socrates <suyit...@selectdb.com>
AuthorDate: Wed Mar 5 14:02:46 2025 +0800

    branch-2.1: [fix](hudi) Set Spark Hudi JNI scanner as default (#48602) 
(#48606)
    
    ### What problem does this PR solve?
    Related PR: #45041
    
    Problem Summary:
    If we set hudi_jni_scanner to an incorrect value, jni_connector will be
    null, causing a core dump.
    So we set Spark Hudi JNI scanner as default and the hadoop hudi jni
    reader will be supported in future
---
 be/src/vec/exec/format/table/hudi_jni_reader.cpp | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/be/src/vec/exec/format/table/hudi_jni_reader.cpp 
b/be/src/vec/exec/format/table/hudi_jni_reader.cpp
index 1888d2a37c7..9188dfd4c7a 100644
--- a/be/src/vec/exec/format/table/hudi_jni_reader.cpp
+++ b/be/src/vec/exec/format/table/hudi_jni_reader.cpp
@@ -72,16 +72,10 @@ HudiJniReader::HudiJniReader(const TFileScanRangeParams& 
scan_params,
         }
     }
 
-    // if (_hudi_params.hudi_jni_scanner == "hadoop") {
-    //     _jni_connector = std::make_unique<JniConnector>(
-    //             "org/apache/doris/hudi/HadoopHudiJniScanner", params, 
required_fields);
-    // }
-    if (_hudi_params.hudi_jni_scanner == "spark") {
-        _jni_connector = 
std::make_unique<JniConnector>("org/apache/doris/hudi/HudiJniScanner",
-                                                        params, 
required_fields);
-    } else {
-        DCHECK(false) << "Unsupported hudi jni scanner: " << 
_hudi_params.hudi_jni_scanner;
-    }
+    // set spark jni scanner as default
+    // TODO: add hadoop jni scanner after hadoop client is ready
+    _jni_connector = 
std::make_unique<JniConnector>("org/apache/doris/hudi/HudiJniScanner", params,
+                                                    required_fields);
 }
 
 Status HudiJniReader::get_next_block(Block* block, size_t* read_rows, bool* 
eof) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to