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

yiguolei 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 80e5e722024 [fix](scanner) coredump caused by 
'prune_predicates_by_zone_map' (#25555)
80e5e722024 is described below

commit 80e5e7220240607d52844c0935e2896d34f02c2c
Author: Jerry Hu <[email protected]>
AuthorDate: Wed Oct 18 16:11:41 2023 +0800

    [fix](scanner) coredump caused by 'prune_predicates_by_zone_map' (#25555)
---
 be/src/olap/comparison_predicate.h        | 2 ++
 be/src/olap/rowset/segment_v2/segment.cpp | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/be/src/olap/comparison_predicate.h 
b/be/src/olap/comparison_predicate.h
index de966833f9d..8ec1504dce5 100644
--- a/be/src/olap/comparison_predicate.h
+++ b/be/src/olap/comparison_predicate.h
@@ -179,6 +179,8 @@ public:
             return false;
         }
 
+        DCHECK_LE(sizeof(T), statistic.first->size());
+
         T tmp_min_value {};
         T tmp_max_value {};
         memcpy((char*)(&tmp_min_value), statistic.first->cell_ptr(), 
sizeof(WarpperFieldType));
diff --git a/be/src/olap/rowset/segment_v2/segment.cpp 
b/be/src/olap/rowset/segment_v2/segment.cpp
index 5399e3ee656..d5d1792ee74 100644
--- a/be/src/olap/rowset/segment_v2/segment.cpp
+++ b/be/src/olap/rowset/segment_v2/segment.cpp
@@ -162,7 +162,9 @@ Status Segment::new_iterator(SchemaSPtr schema, const 
StorageReadOptions& read_o
         auto pruned_predicates = read_options.column_predicates;
         auto pruned = false;
         for (auto& it : _column_readers) {
-            if (it.second->prune_predicates_by_zone_map(pruned_predicates, 
it.first)) {
+            const auto uid = it.first;
+            const auto column_id = 
read_options.tablet_schema->field_index(uid);
+            if (it.second->prune_predicates_by_zone_map(pruned_predicates, 
column_id)) {
                 pruned = true;
             }
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to