yiguolei commented on code in PR #51271:
URL: https://github.com/apache/doris/pull/51271#discussion_r2115245000


##########
be/src/olap/rowset/beta_rowset_reader.cpp:
##########
@@ -221,6 +225,40 @@ Status 
BetaRowsetReader::get_segment_iterators(RowsetReaderContext* read_context
         _read_options.io_ctx.expiration_time = 0;
     }
 
+    if (config::cache_zone_map_max_columns_count > 0) {
+        RETURN_IF_ERROR(_rowset->load_segments_info());
+        const auto& zone_maps = _rowset->get_zone_maps();
+        _read_options.stats->rowset_cached_zone_maps_number += 
zone_maps.size();
+        auto rowset_meta = _rowset->rowset_meta();
+        auto tablet_schema = rowset_meta->tablet_schema();
+        for (auto& col_to_predicate : _read_options.col_id_to_predicates) {
+            auto col_uid = col_to_predicate.first;
+            auto& predicate = col_to_predicate.second;
+
+            if (zone_maps.find(col_uid) == zone_maps.end()) {

Review Comment:
   这个逻辑应该不对。
   在load zonemap的时候,我们使用的是column unique id 作为key; 但是column predicate 里是column 
id,准确的说是column offset,所以这俩有的时候不相等。



-- 
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