HappenLee commented on code in PR #63389:
URL: https://github.com/apache/doris/pull/63389#discussion_r3330015641


##########
be/src/storage/segment/segment.cpp:
##########
@@ -85,6 +89,87 @@ namespace doris::segment_v2 {
 
 class InvertedIndexIterator;
 
+namespace {
+
+Status build_segment_zonemap_context(Segment* segment, const Schema& schema,
+                                     const StorageReadOptions& read_options,
+                                     const VExprContextSPtrs& conjuncts, 
ZoneMapEvalContext* ctx) {
+    DORIS_CHECK(segment != nullptr);
+    DORIS_CHECK(ctx != nullptr);
+    std::set<int> slot_indexes;
+    for (const auto& conjunct : conjuncts) {
+        if (conjunct->root() != nullptr) {
+            conjunct->root()->collect_slot_column_ids(slot_indexes);
+        }
+    }
+    for (const int slot_index : slot_indexes) {

Review Comment:
   这里是不是只需要处理表达式里只有一个slot依赖的列呢?和下面判断
   ```
   if (slot_indexes.size() != 1) {
           return std::nullopt;
       }``` 
   
   一样呢,这会导致一些zonemap被无端读取



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to