fix: preserve paged all-null projections#7
Merged
Conversation
Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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.
Problem
Paged buckets store
ALL_NULLcolumns as directory entries withslot_size = 0and no slot payload. The reader correctly skipped round 2 IO for those slots, but partial projection also used the presence of round 2 ranges to decide whether to construct paged bucket readers.As a result, when a projection requested only all-null columns from a partial paged bucket, the requested column could be dropped from the output.
Fix
Separate the two concepts:
slot_size > 0decides whether a projected column needs round 2 IO.projected[gi]decides whether a column needs to appear in the result.The reader now tracks partial paged buckets explicitly and constructs their readers even when no round 2 IO is required.
ALL_NULLprojected slots are materialized with anENCODING_ALL_NULLreader.Tests
cargo test --workspace.cargo clippy --workspace --all-targets -- -D warnings.