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


##########
be/src/storage/segment/segment.cpp:
##########
@@ -390,20 +386,17 @@ Status Segment::new_iterator(SchemaSPtr schema, const 
StorageReadOptions& read_o
     read_options.stats->total_segment_number++;
     // trying to prune the current segment by segment-level zone map
     for (const auto& entry : read_options.col_id_to_predicates) {
+        // col_id_to_predicates is keyed by read-schema ordinal.
         int32_t column_id = entry.first;
-        // schema change
-        if (_tablet_schema->num_columns() <= column_id) {
-            continue;
-        }
-        const TabletColumn& col = 
read_options.tablet_schema->column(column_id);
+        const TabletColumn& col = *schema->column(column_id);

Review Comment:
   这个如果在当前segment 中不存在这个column,怎么处理?



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