github-actions[bot] commented on code in PR #70001:
URL: https://github.com/apache/doris/pull/70001#discussion_r4451313348
##########
be/src/storage/segment/variant/v2/variant_shredder.cpp:
##########
@@ -509,6 +509,11 @@ struct VariantShredder::Impl {
DorisVector<SparsePlan> sparse_plan = build_sparse_plan(selection,
candidate_builders);
select_sparse_statistics(&sparse_plan);
+ // Readers search full path bytes: a-b must precede a.c, unlike
component order.
+ // Select statistics first to retain the existing encounter-order
budget tie-break.
+ std::ranges::sort(sparse_plan, [](const SparsePlan& left, const
SparsePlan& right) {
Review Comment:
[P1] Handle pre-fix V2 segments before claiming sparse ordering is fixed
This only reorders maps as they are written. Current master always
constructs DataTypeVariantV2 for VARIANT columns, so segments written by the
pre-fix writer retain component order while the unchanged StorageMapRowCursor
binary-searches raw path bytes. A table that already has such a segment can
still return NULL for an `a-b`/`a.c` lookup after this change (and
SparseColumnMergeIterator also assumes sorted input) until that segment is
rewritten; this PR adds no reader fallback or rewrite guarantee. Please add a
compatibility path/rewrite guarantee or document and gate the upgrade behavior.
--
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]