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


##########
be/src/vec/core/block.cpp:
##########
@@ -958,12 +958,27 @@ Status MutableBlock::add_rows(const Block* block, const 
uint32_t* row_begin,
             DCHECK_EQ(columns(), column_offset->size());
         }
         const auto& block_data = block->get_columns_with_type_and_name();
+
+        // Validate all row indices before processing any column.
+        // All columns in a block share the same row count, so we only need to
+        // check against the first column's size.
+        if (row_begin != row_end && !block_data.empty()) {

Review Comment:
   The CHECK is too complicated, it should work only in DEBUG mode.



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