Fix doris 26821 map lazy fill#65403
Open
HappenLee wants to merge 2 commits into
Open
Conversation
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: Lazy pruned complex-column reads can materialize only KEYS or VALUES for a MAP nested under a STRUCT when predicate evaluation reads another path. The skipped MAP side stayed empty in the lazy phase, so ColumnMap offsets no longer matched key/value column sizes. This patch fills defaults for a skipped MAP child according to the element count while leaving predicate-materialized children untouched. ### Release note Fix MAP nested column pruning with lazy materialization when only map keys or values are projected. ### Check List (For Author) - Test: Unit Test: ./run-be-ut.sh -j 48 --run --filter=ColumnReaderTest.MapNextBatchLazyFillsSkippedKeyOrValueColumn:ColumnReaderTest.MapReadByRowidsLazyFillsSkippedKeyOrValueColumn - Test: Regression test: ./run-regression-test.sh --run --conf /tmp/doris_26821_regression-conf.groovy -d datatype_p0/complex_types -s test_pruned_struct_map_lazy - Test: Static analysis: CLANG_TIDY_BINARY=/mnt/disk6/common/ldb_toolchain_028/bin/clang-tidy build-support/run-clang-tidy.sh --files be/src/storage/segment/column_reader.cpp be/test/storage/segment/column_reader_test.cpp --build-dir be/ut_build_ASAN - Behavior changed: Yes. MAP nested lazy materialization now keeps key/value child sizes aligned when one side is pruned. - Does this need documentation: No
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: ZoneMap min and max values were serialized through type-specific OLAP strings, and page ZoneMaps were stored as one serialized ZoneMapPB per page in an IndexedColumn. This added string formatting/parsing cost and per-page protobuf/container overhead. This change adds native binary ZoneMapEntryPB serialization for segment ZoneMaps, stores page ZoneMaps in one array-oriented native ZoneMapPagesPB payload, keeps legacy readers for old rowsets, and switches page pruning paths to use decoded ZoneMap objects directly.
### Release note
New rowsets store ZoneMap metadata in a native binary format. Existing rowsets with legacy string ZoneMap metadata remain readable.
### Check List (For Author)
- Test: Regression test / Unit Test / Manual test
- Unit Test: ./run-be-ut.sh -j 48 --run --filter=ColumnZoneMapTest.*
- Unit Test: ./run-be-ut.sh -j 48 --run --filter=ColumnZoneMapTest.*:SegmentIteratorExprZonemapTest.*
- Unit Test: ./run-be-ut.sh -j 48 --run --filter=MetadataAdderTest.* (meta_load_with_pb_test passed; metadata_adder_test failed on pre-existing global MetadataAdder counters)
- Manual test: PATH=/mnt/disk6/common/ldb_toolchain_toucan/bin:$PATH build-support/check-format.sh
- Manual test: build-support/run-clang-tidy.sh --build-dir be/ut_build_ASAN --files be/src/storage/index/zone_map/zone_map_index.cpp be/src/storage/segment/column_reader.cpp be/src/storage/segment/segment_iterator.cpp be/test/storage/segment/zone_map_index_test.cpp be/test/storage/metadata_adder_test.cpp
- Manual test: git diff --check
- Behavior changed: Yes. New rowsets no longer dual-write legacy ZoneMap metadata; pruning semantics are unchanged.
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
FE UT Coverage ReportIncrement line coverage `` 🎉 |
Contributor
TPC-H: Total hot run time: 29528 ms |
Contributor
TPC-DS: Total hot run time: 180640 ms |
Contributor
ClickBench: Total hot run time: 25.28 s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)