[fix](variant) Fix variant flat-leaf root read plan#63086
[fix](variant) Fix variant flat-leaf root read plan#63086eldenmoon merged 1 commit intoapache:masterfrom
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Flat-leaf compaction/checksum mode should keep root variant reads on the root-flat path and should not fall back to doc-value root reconstruction. Avoid probing an empty leaf path, keep explicit doc bucket columns on DOC_COMPACT, and update the doc-bucket unit test to assert that root uses VariantRootColumnIterator in flat-leaf mode.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- `./run-be-ut.sh --run --filter='VariantColumnWriterReaderTest.test_read_doc_compact_from_doc_value_bucket'`: 1 test passed
- `./run-be-ut.sh --run --filter='*Variant*'`: 172 tests from 16 test suites, 171 passed, 1 skipped
- `build-support/clang-format.sh be/src/storage/segment/variant/variant_column_reader.cpp be/test/storage/segment/variant_column_writer_reader_test.cpp`
- `git diff --check`
- Behavior changed: No
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
There was a problem hiding this comment.
Pull request overview
Fixes the BE Variant flat-leaf (compaction/checksum) read planner so root Variant reads stay on the root-flat path (VariantRootColumnIterator) instead of falling back to doc-value based reconstruction, and ensures explicit doc-value bucket columns keep using the DOC_COMPACT read path.
Changes:
- Adjust flat-leaf read planning to route root-path reads to
ReadKind::ROOT_FLAT(VariantRootColumnIterator) and avoid doc-value hierarchical fallbacks in this mode. - Ensure doc-value bucket columns are planned as
ReadKind::DOC_COMPACTin flat-leaf compaction. - Update the doc-bucket unit test to assert the root iterator type in flat-leaf mode.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| be/src/storage/segment/variant/variant_column_reader.cpp | Updates flat-leaf read-plan selection to keep root reads on ROOT_FLAT and avoid doc-value hierarchical planning in this mode. |
| be/test/storage/segment/variant_column_writer_reader_test.cpp | Updates unit test expectations to assert VariantRootColumnIterator is used for root reads in flat-leaf compaction mode. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Review result: no blocking issues found in this PR.
Critical checkpoint conclusions:
- Goal and proof: The change keeps flat-leaf compaction/checksum root variant reads on
ROOT_FLATwhile preserving explicit doc-bucket reads throughDOC_COMPACT; the updated unit test covers the iterator selection for both root and doc buckets. - Scope: The modification is small and focused on flat-leaf read planning plus the corresponding test expectation.
- Concurrency/lifecycle: No new shared state, lock ordering, or lifecycle ownership changes were introduced. The existing
_subcolumns_meta_mutexcoverage remains unchanged. - Configuration/compatibility: No new configuration, storage format, Thrift, or FE/BE protocol compatibility changes were introduced.
- Parallel paths: Query-mode hierarchical/doc reconstruction remains unchanged; only compaction/checksum flat-leaf planning is affected.
- Data correctness: The changed root branch now avoids doc-value root reconstruction in flat-leaf mode, while doc bucket paths are still handled before sparse/default fallback.
- Tests: Existing PR notes report the targeted and variant BE unit tests passed. I attempted to rerun
./run-be-ut.sh --run --filter='VariantColumnWriterReaderTest.test_read_doc_compact_from_doc_value_bucket', but this runner is missingthirdparty/installed/bin/protoc, so local verification could not complete here. - Observability/performance: No new hot-path allocations beyond the existing plan construction; no additional observability appears necessary for this narrow planner fix.
- User focus: No additional user-provided review focus was present.
TPC-H: Total hot run time: 29537 ms |
TPC-DS: Total hot run time: 170753 ms |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by anyone and no changes requested. |
|
PR approved by at least one committer and no changes requested. |
Problem Summary: Flat-leaf compaction/checksum mode should keep root variant reads on the root-flat path and should not fall back to doc-value root reconstruction. Avoid probing an empty leaf path, keep explicit doc bucket columns on DOC_COMPACT, and update the doc-bucket unit test to assert that root uses VariantRootColumnIterator in flat-leaf mode.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Flat-leaf compaction/checksum mode should keep root variant reads on the root-flat path and should not fall back to doc-value root reconstruction. Avoid probing an empty leaf path, keep explicit doc bucket columns on DOC_COMPACT, and update the doc-bucket unit test to assert that root uses VariantRootColumnIterator in flat-leaf mode.
Release note
None
Check List (For Author)
./run-be-ut.sh --run --filter='VariantColumnWriterReaderTest.test_read_doc_compact_from_doc_value_bucket': 1 test passed./run-be-ut.sh --run --filter='*Variant*': 172 tests from 16 test suites, 171 passed, 1 skippedbuild-support/clang-format.sh be/src/storage/segment/variant/variant_column_reader.cpp be/test/storage/segment/variant_column_writer_reader_test.cppgit diff --checkintroduced by #62848