zhannngchen commented on code in PR #17873:
URL: https://github.com/apache/doris/pull/17873#discussion_r1147080199


##########
be/src/vec/olap/block_reader.cpp:
##########
@@ -171,6 +171,11 @@ Status BlockReader::init(const ReaderParams& read_params) {
         _next_block_func = &BlockReader::_direct_next_block;
         return Status::OK();
     }
+    if (_reader_type == READER_BASE_COMPACTION || _reader_type == 
READER_CUMULATIVE_COMPACTION ||
+        _reader_type == READER_CHECKSUM) {
+        _should_check_same_row = true;
+        LOG(INFO) << "yixiu should check same row";

Review Comment:
   rewrite this log



##########
be/src/vec/olap/block_reader.cpp:
##########
@@ -287,6 +303,10 @@ Status BlockReader::_unique_key_next_block(Block* block, 
bool* eof) {
             _block_row_locations[target_block_row] = 
_vcollect_iter.current_row_location();
         }
         target_block_row++;
+        if (_should_check_same_row && target_block_row > 1) {
+            DCHECK(compare_row(block, target_block_row - 1, block, 
target_block_row - 2) != 0)
+                    << "find same row when do _agg_key_next_block";

Review Comment:
   _agg_key_next_block -> _unique_key_next_block



##########
be/src/vec/olap/block_reader.h:
##########
@@ -110,6 +114,8 @@ class BlockReader final : public TabletReader {
     ColumnPtr _delete_filter_column;
 
     bool _is_rowsets_overlapping = true;
+
+    bool _should_check_same_row = false;

Review Comment:
   don't we consider VerticalBlockReader?



##########
be/src/vec/olap/block_reader.cpp:
##########
@@ -306,6 +326,12 @@ Status BlockReader::_unique_key_next_block(Block* block, 
bool* eof) {
             return res;
         }
     } while (target_block_row < _reader_context.batch_size);
+    if (_should_check_same_row && target_block_row >= 
_reader_context.batch_size) {
+        // compare current block last row with next block first row
+        DCHECK(compare_row(block, target_block_row - 1, _next_row.block.get(), 
_next_row.row_pos) !=
+               0)
+                << "find same row when do _agg_key_next_block";

Review Comment:
   ditto



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to