github-actions[bot] commented on code in PR #66306:
URL: https://github.com/apache/doris/pull/66306#discussion_r3701170110
##########
be/test/storage/compaction/vertical_compaction_test.cpp:
##########
@@ -1278,11 +1294,38 @@ TEST_F(VerticalCompactionTest,
TestUniqueKeyVerticalMergeWithNullableSparseColum
RowsetSharedPtr out_rowset;
ASSERT_EQ(Status::OK(), output_rs_writer->build(out_rowset));
- // Verify output
- EXPECT_EQ(out_rowset->rowset_meta()->num_rows(), num_input_rowset *
rows_per_segment);
+ RowsetReaderContext reader_context;
+ reader_context.tablet_schema = tablet_schema;
+ reader_context.need_ordered_result = false;
+ std::vector<uint32_t> return_columns = {0, 1, 2};
+ reader_context.return_columns = &return_columns;
+ RowsetReaderSharedPtr output_rs_reader;
+ create_and_init_rowset_reader(out_rowset.get(), reader_context,
&output_rs_reader);
- // Restore original threshold
- config::sparse_column_compaction_threshold_percent = original_threshold;
+ Block output_block;
+ size_t output_rows = 0;
+ do {
+ block_create(tablet_schema, &output_block);
Review Comment:
Build this block from `return_columns`, not the full tablet schema.
`block_create` adds all four schema columns, including `DELETE_SIGN`, while
this reader's output schema contains only `{0, 1, 2}`. In debug builds
`SegmentIterator` rejects the untouched empty fourth column after reading rows;
otherwise the following `ASSERT_EQ(columns.size(), 3)` still sees four columns
and fails. The new regression therefore stops before validating the offset fix.
Use `output_block = tablet_schema->create_block(return_columns);` here.
--
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]