You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "airborne12 (via GitHub)" <gi...@apache.org> on 2023/07/27 01:41:57 UTC

[GitHub] [doris] airborne12 commented on a diff in pull request #22275: (vertical compaction) fix vertical compaction core

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-unsubscribe@doris.apache.org

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


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