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


##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -2203,22 +2081,32 @@ bool 
SegmentIterator::_can_evaluated_by_vectorized(std::shared_ptr<ColumnPredica
     }
 }
 
-bool SegmentIterator::_prune_column(ColumnId cid, MutableColumnPtr& column, 
bool fill_defaults,
-                                    size_t num_of_defaults) {
-    if (_need_read_data(cid)) {
-        return false;
-    }
-    if (!fill_defaults) {
-        return true;
-    }
-    if (is_column_nullable(*column)) {
+void SegmentIterator::_fill_default_column(MutableColumnPtr& column, size_t 
num_of_defaults) {
+    if (column->is_nullable()) {
         auto nullable_col_ptr = 
reinterpret_cast<ColumnNullable*>(column.get());
         
nullable_col_ptr->get_null_map_column().insert_many_defaults(num_of_defaults);
         
nullable_col_ptr->get_nested_column_ptr()->insert_many_defaults(num_of_defaults);
     } else {
         // assert(column->is_const());
         column->insert_many_defaults(num_of_defaults);
     }
+}
+
+bool SegmentIterator::_prune_column(ColumnId cid, MutableColumnPtr& column,
+                                    size_t num_of_defaults) {
+    if (_opts.filled_columns.contains(cid) && !_is_pred_column.empty()) {
+        DCHECK_EQ(_is_pred_column.size(), _is_common_expr_column.size());
+        DCHECK_LT(cid, _is_pred_column.size());
+        if (!_virtual_column_exprs.contains(cid) && 
!_has_delete_predicate(cid) &&

Review Comment:
   感觉并不是filled column 是always 可以乱填写的,不是总可以用默认值来fill的



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