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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 75c97e683f0 branch-3.0: [fix](orc) fix predicate filter failed when 
use hive 1.x version (#47980)
75c97e683f0 is described below

commit 75c97e683f030e7eff7e4253de28909208fbc63c
Author: Socrates <suyit...@selectdb.com>
AuthorDate: Sat Feb 22 14:12:54 2025 +0800

    branch-3.0: [fix](orc) fix predicate filter failed when use hive 1.x 
version (#47980)
    
    Pick the pr to branch-3.0 to fix predicate filter failed when use hive
    1.x version
---
 be/src/vec/exec/format/orc/vorc_reader.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/be/src/vec/exec/format/orc/vorc_reader.cpp 
b/be/src/vec/exec/format/orc/vorc_reader.cpp
index 151b5820515..e1e13aed9c2 100644
--- a/be/src/vec/exec/format/orc/vorc_reader.cpp
+++ b/be/src/vec/exec/format/orc/vorc_reader.cpp
@@ -724,6 +724,19 @@ bool OrcReader::_init_search_argument(
     if (predicates.empty()) {
         return false;
     }
+
+    if (_is_hive1_orc_or_use_idx) {
+        // use hive 1.x version orc file, need to convert column name to 
internal column name
+        for (OrcPredicate& it : predicates) {
+            it.col_name = _col_name_to_file_col_name[it.col_name];
+        }
+    }
+
+    // check if all column names in predicates are same as orc file
+    DCHECK(std::all_of(predicates.begin(), predicates.end(), [&](const 
OrcPredicate& predicate) {
+        return type_map.contains(predicate.col_name);
+    }));
+
     std::unique_ptr<orc::SearchArgumentBuilder> builder = 
orc::SearchArgumentFactory::newBuilder();
     if (build_search_argument(predicates, 0, builder)) {
         std::unique_ptr<orc::SearchArgument> sargs = builder->build();


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

Reply via email to