github-actions[bot] commented on code in PR #69395:
URL: https://github.com/apache/doris/pull/69395#discussion_r4335406153
##########
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:
[P1] Recognize VERSION columns when their schema index is unset
For a supported UNIQUE KEY merge-on-read table with `"light_schema_change" =
"false"`, `version_col_idx()` can be `-1` while `__DORIS_VERSION_COL__` exists.
`TabletMeta::init_schema_from_thrift()` never copies that index, and
`BaseRowsetBuilder::_build_current_tablet_schema()` copies the original schema
when FE column IDs are unset. Two tidy singleton inserts then pass this guard
and are linked into a range; `Segment::_get_column_reader_for_read()` switches
from synthesized versions to the physical `0` placeholders, so hidden VERSION
queries and filters remain wrong. Detect the column by name (or normalize these
schemas) and add the regression variant with light schema change disabled.
--
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]