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


##########
be/src/storage/iterator/vgeneric_iterators.cpp:
##########
@@ -93,27 +93,12 @@ Status VStatisticsIterator::next_batch(Block* block) {
     return Status::EndOfFile("End of VStatisticsIterator");
 }
 
-// Build the block using the output schema, which contains only the columns
-// the caller requested (return_columns). Delete predicate columns are excluded
-// because SegmentIterator handles them independently:
-//   - _init_current_block() skips predicate columns (including delete 
predicates)
-//     via the _is_pred_column[cid] check, so it never accesses the block by 
those positions.
-//   - _output_non_pred_columns() checks loc < block->columns() before filling 
any column,
-//     so delete predicate columns (whose loc exceeds block->columns()) are 
simply skipped.
-//   - Delete predicate evaluation happens entirely through 
_current_return_columns and
-//     _evaluate_short_circuit_predicate(), which are independent of the block 
structure.
 Status VMergeIteratorContext::block_reset(const std::shared_ptr<Block>& block) 
{
     if (!block->columns()) {
-        const auto& column_ids = _output_schema->column_ids();
-        for (size_t i = 0; i < _output_schema->num_column_ids(); ++i) {
-            auto column_desc = _output_schema->column(column_ids[i]);
-            auto data_type = Schema::get_data_type_ptr(*column_desc);
-            if (data_type == nullptr) {
-                return Status::RuntimeError("invalid data type");
-            }
-            auto column = data_type->create_column();
+        *block = _read_schema->create_read_block();
+        auto columns_guard = block->mutate_columns_scoped();
+        for (auto& column : columns_guard.mutable_columns()) {

Review Comment:
   我们之前为什么不是在segment iteartor 中把新加的delete dropped column 删掉啊,为啥要传递会这些iterator 中呢



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