mrhhsg commented on code in PR #69395:
URL: https://github.com/apache/doris/pull/69395#discussion_r4344024374
##########
be/src/storage/compaction/compaction.cpp:
##########
@@ -753,6 +753,21 @@ bool CompactionMixin::handle_ordered_data_compaction() {
}
}
+ // A non-empty singleton stores placeholders for publish-time VERSION and
TSO columns.
+ // Linking [2-2] and [3-3] into [2-3] would expose those placeholders
rather than the
+ // synthesized values. Check only the rowsets actually linked: the tidy
scan below can
+ // drop an unsafe tail [10-10] while retaining a safe range prefix [2-9].
+ auto links_unmaterialized_hidden_column = [this] {
+ return _input_rowsets.front()->start_version() !=
_input_rowsets.back()->end_version() &&
+ std::ranges::any_of(_input_rowsets, [](const RowsetSharedPtr&
rowset) {
+ const auto& schema = rowset->tablet_schema();
+ return rowset->num_rows() > 0 &&
+ rowset->start_version() == rowset->end_version() &&
+ (schema->version_col_idx() >= 0 ||
schema->commit_tso_col_idx() >= 0 ||
Review Comment:
Fixed at c8b9387: the ordered-link guard now detects VERSION by column name
even when version_col_idx is unset. The focused BE test and
light_schema_change=false SQL regression both pass on this head.
##########
be/src/storage/transform/block_transform.cpp:
##########
@@ -162,6 +162,13 @@ class RowStoreFillStage : public BlockTransform {
BlockTransformChain build_transform_chain(const RowsetWriterContext& context) {
if (context.write_type == DataWriteType::TYPE_COMPACTION) {
+ // A full-row MOR compaction reads the published VERSION from the
column reader. Rebuild
+ // JSONB from that block instead of copying the original singleton's
VERSION=0 payload.
+ if (context.tablet_schema->keys_type() == KeysType::UNIQUE_KEYS &&
+ context.tablet_schema->has_row_store_for_all_columns() &&
+ context.tablet_schema->field_index(VERSION_COL) >= 0) {
+ return BlockTransformChain
{{std::make_shared<RowStoreFillStage>()}};
Review Comment:
The row-store rebuild/VARIANT change that introduced this failure has been
removed from this PR. The updated head c8b9387 changes only ordered-link
admission and its tests; this finding no longer applies to the PR diff.
Row-store behavior is explicitly outside this PR scope.
--
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]