Skip to content

fix: preserve paged all-null projections#7

Merged
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:fix/paged-null-proj
May 19, 2026
Merged

fix: preserve paged all-null projections#7
JingsongLi merged 1 commit into
apache:mainfrom
QuakeWang:fix/paged-null-proj

Conversation

@QuakeWang
Copy link
Copy Markdown
Contributor

Problem

Paged buckets store ALL_NULL columns as directory entries with slot_size = 0 and 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 > 0 decides 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_NULL projected slots are materialized with an ENCODING_ALL_NULL reader.

Tests

  • Added a regression test for projecting only an all-null paged column.
  • Ran cargo test --workspace.
  • Ran cargo clippy --workspace --all-targets -- -D warnings.

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit fa792b7 into apache:main May 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants