airborne12 commented on code in PR #22275:
URL: https://github.com/apache/doris/pull/22275#discussion_r1275640430


##########
be/src/olap/merger.cpp:
##########
@@ -246,6 +246,25 @@ Status Merger::vertical_compact_one_group(
         RETURN_NOT_OK_STATUS_WITH_WARN(
                 reader.next_block_with_aggregation(&block, &eof),
                 "failed to read next block when merging rowsets of tablet " + 
tablet->full_name());
+        if (!is_key && eof) {
+            DCHECK_EQ(dst_rowset_writer->num_rows(), stats_output->output_rows)
+                    << "dst_rowset_writer->num_rows() != 
stats_output->output_rows:"
+                    << dst_rowset_writer->num_rows() << " vs. " << 
stats_output->output_rows;
+            auto block_rows = dst_rowset_writer->num_rows();
+            auto buf_size = row_source_buf->buffered_size();
+            auto merged_rows = reader.merged_rows();
+            if (output_rows + block_rows != buf_size - merged_rows) {
+                row_source_buf->seek_to_begin();
+                uint32_t agg_rows = 0;

Review Comment:
   is there any place using agg_rows?



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