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


##########
be/src/storage/segment/segment_iterator.cpp:
##########
@@ -3035,24 +2808,24 @@ Status SegmentIterator::_next_batch_internal(Block* 
block) {
     return _check_output_block(block);
 }
 
-Status SegmentIterator::_process_columns(const std::vector<ColumnId>& 
column_ids, Block* block) {
-    RETURN_IF_ERROR(_convert_to_expected_type(column_ids));
-    for (auto cid : column_ids) {
-        auto loc = _schema->column_index(cid);
-        block->replace_by_position(loc, 
std::move(_current_return_columns[cid]));
+Status SegmentIterator::_process_columns(const std::vector<ColumnId>& 
ordinals, Block* block) {
+    RETURN_IF_ERROR(_convert_to_expected_type(ordinals));
+    for (auto cid : ordinals) {
+        DCHECK_LT(cid, _schema->num_block_columns());
+        block->replace_by_position(cid, std::move(_current_columns[cid]));

Review Comment:
   我们有很多个这个replace 都是啥含义啊,感觉应该是最后返回的时候replace 一次就行



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