You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2025/04/18 03:25:49 UTC

(doris) branch master updated: [fix](orc-reader) Fix orc lazy materialization should not be bundled with pushdown. (#49835)

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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new d55ece302e9 [fix](orc-reader) Fix orc lazy materialization should not be bundled with pushdown. (#49835)
d55ece302e9 is described below

commit d55ece302e956c5b064065b8aa55fd4035e86ba7
Author: Qi Chen <ch...@selectdb.com>
AuthorDate: Fri Apr 18 11:25:43 2025 +0800

    [fix](orc-reader) Fix orc lazy materialization should not be bundled with pushdown. (#49835)
    
    ### What problem does this PR solve?
    
    Problem Summary:
    The current orc pushdown and delayed materialization conditions are
    connected together. The conditions that can be pushed down must be used
    for delayed materialization conditions. This is unreasonable. The two
    should be orthogonal.
    
    ### Release note
    - Fix orc lazy materialization should not be bundled with pushdown.
    - Fix materialization for hive acid table.
---
 be/src/apache-orc                          |  2 +-
 be/src/vec/exec/format/orc/vorc_reader.cpp | 19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/be/src/apache-orc b/be/src/apache-orc
index f3349e01f34..c9891b33063 160000
--- a/be/src/apache-orc
+++ b/be/src/apache-orc
@@ -1 +1 @@
-Subproject commit f3349e01f343ee84241427c5b46e8ecc3bed6d5b
+Subproject commit c9891b33063b32c72f3db6c61b6b59ba65444aee
diff --git a/be/src/vec/exec/format/orc/vorc_reader.cpp b/be/src/vec/exec/format/orc/vorc_reader.cpp
index ee34bd8c3fd..709ea0bf327 100644
--- a/be/src/vec/exec/format/orc/vorc_reader.cpp
+++ b/be/src/vec/exec/format/orc/vorc_reader.cpp
@@ -1062,12 +1062,25 @@ Status OrcReader::set_fill_columns(
         visit_slot(conjunct->root().get());
     }
 
+    if (_is_acid) {
+        _lazy_read_ctx.predicate_orc_columns.insert(
+                _lazy_read_ctx.predicate_orc_columns.end(),
+                TransactionalHive::READ_ROW_COLUMN_NAMES.begin(),
+                TransactionalHive::READ_ROW_COLUMN_NAMES.end());
+    }
+
     for (auto& read_col : _read_cols_lower_case) {
         _lazy_read_ctx.all_read_columns.emplace_back(read_col);
         if (!predicate_columns.empty()) {
             auto iter = predicate_columns.find(read_col);
             if (iter == predicate_columns.end()) {
-                _lazy_read_ctx.lazy_read_columns.emplace_back(read_col);
+                if (!_is_acid ||
+                    std::find(TransactionalHive::READ_ROW_COLUMN_NAMES_LOWER_CASE.begin(),
+                              TransactionalHive::READ_ROW_COLUMN_NAMES_LOWER_CASE.end(),
+                              read_col) ==
+                            TransactionalHive::READ_ROW_COLUMN_NAMES_LOWER_CASE.end()) {
+                    _lazy_read_ctx.lazy_read_columns.emplace_back(read_col);
+                }
             } else {
                 _lazy_read_ctx.predicate_columns.first.emplace_back(iter->first);
                 _lazy_read_ctx.predicate_columns.second.emplace_back(iter->second.second);
@@ -1124,8 +1137,10 @@ Status OrcReader::set_fill_columns(
         _lazy_read_ctx.can_lazy_read = true;
     }
 
-    if (_lazy_read_ctx.conjuncts.empty() || !_init_search_argument(_lazy_read_ctx.conjuncts)) {
+    if (_lazy_read_ctx.conjuncts.empty()) {
         _lazy_read_ctx.can_lazy_read = false;
+    } else {
+        _init_search_argument(_lazy_read_ctx.conjuncts);
     }
     try {
         _row_reader_options.range(_range_start_offset, _range_size);


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