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


##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -3092,12 +2866,16 @@ Status SegmentIterator::_check_output_block(Block* 
block) {
 }
 
 Status SegmentIterator::_process_eof(Block* block) {
-    // Convert all columns in _current_return_columns to schema column
-    RETURN_IF_ERROR(_convert_to_expected_type(_schema->column_ids()));
-    for (int i = 0; i < block->columns(); i++) {
-        auto cid = _schema->column_id(i);
-        if (!_is_pred_column[cid]) {
-            block->replace_by_position(i, 
std::move(_current_return_columns[cid]));
+    DCHECK_EQ(block->columns(), _schema->num_block_columns());
+    // Convert all current columns to the exact read-schema types.
+    for (ColumnId column_id = 0; column_id < _schema->num_read_columns(); 
++column_id) {
+        if (_is_active_read_column(column_id)) {
+            RETURN_IF_ERROR(_convert_column_to_expected_type(column_id));
+        }
+    }
+    for (size_t i = 0; i < block->columns(); i++) {
+        if (!_column_states[i].is_predicate()) {
+            block->replace_by_position(i, std::move(_current_columns[i]));

Review Comment:
   这又来了一波replace,包括之前那个convert,我感觉都是一个事,表达了,当我们要把current columns 的结果,放进block 
里这个事



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