fix(encoding): decode empty inline-bitpacked blocks#7752
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesEmpty inline bitpacking handling
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Xuanwo
marked this pull request as ready for review
July 13, 2026 10:39
BubbleCal
approved these changes
Jul 13, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Xuanwo
added a commit
that referenced
this pull request
Jul 21, 2026
Part of #7750 Depends on #7752. Wire contract discussion: #7631. The validity-polarity text and vote remain a merge gate. This PR freezes the Lance 2.3 SparseLayout wire contract and lands its safe, selective reader together with an explicit writer so the contract is exercised end to end. The reader rejects SparseLayout in pre-2.3 files, validates metadata, domains, semantic sets, descriptors, buffer ranges, compression headers, chunk sums, and complete chunk consumption, caches normalized plans, projects range/take selections through nested layers, reads only intersecting value chunks, and rebuilds no-value selections without value I/O. SparseLayout adds no format-specific size or descriptor-complexity quotas for otherwise representable buffers; callers retain responsibility for resource policy. The writer can emit sparse pages only when field metadata explicitly sets `lance-encoding:structural-encoding=sparse` for a Lance 2.3 file. It does not add automatic selection or change the default encoding policy. Lance 2.3 is unstable, so tests generate pages at runtime and round-trip them; this PR contains no checked-in compatibility fixture or generated test artifact. Coverage includes nullable primitive and struct, list/large-list/map/fixed-size-list, null versus empty lists, both validity polarities, all semantic position/count representations, scan, range, take, deeply nested structures, no-value selections, selective value I/O, malformed pages, large representable buffers/descriptors, and pre-2.3 rejection. Validation: - `cargo fmt --all -- --check` - `cargo check -p lance-encoding -p lance-file --features protoc` - `protoc --descriptor_set_out=/dev/null --proto_path=protos protos/encodings_v2_1.proto protos/file2.proto` - `cargo test -p lance-encoding -p lance-file` (470 + 93 passed; 0 failed) - focused sparse reader/writer and malformed-page tests - `uv run mkdocs build` - `cargo clippy --all --tests --benches -- -D warnings` --------- Co-authored-by: Weston Pace <[email protected]>
Xuanwo
added a commit
that referenced
this pull request
Jul 21, 2026
Part of #7750 Depends on #7752. Wire contract discussion: #7631. The validity-polarity text and vote remain a merge gate. This PR freezes the Lance 2.3 SparseLayout wire contract and lands its safe, selective reader together with an explicit writer so the contract is exercised end to end. The reader rejects SparseLayout in pre-2.3 files, validates metadata, domains, semantic sets, descriptors, buffer ranges, compression headers, chunk sums, and complete chunk consumption, caches normalized plans, projects range/take selections through nested layers, reads only intersecting value chunks, and rebuilds no-value selections without value I/O. SparseLayout adds no format-specific size or descriptor-complexity quotas for otherwise representable buffers; callers retain responsibility for resource policy. The writer can emit sparse pages only when field metadata explicitly sets `lance-encoding:structural-encoding=sparse` for a Lance 2.3 file. It does not add automatic selection or change the default encoding policy. Lance 2.3 is unstable, so tests generate pages at runtime and round-trip them; this PR contains no checked-in compatibility fixture or generated test artifact. Coverage includes nullable primitive and struct, list/large-list/map/fixed-size-list, null versus empty lists, both validity polarities, all semantic position/count representations, scan, range, take, deeply nested structures, no-value selections, selective value I/O, malformed pages, large representable buffers/descriptors, and pre-2.3 rejection. Validation: - `cargo fmt --all -- --check` - `cargo check -p lance-encoding -p lance-file --features protoc` - `protoc --descriptor_set_out=/dev/null --proto_path=protos protos/encodings_v2_1.proto protos/file2.proto` - `cargo test -p lance-encoding -p lance-file` (470 + 93 passed; 0 failed) - focused sparse reader/writer and malformed-page tests - `uv run mkdocs build` - `cargo clippy --all --tests --benches -- -D warnings` --------- Co-authored-by: Weston Pace <[email protected]>
This was referenced Jul 21, 2026
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.
Part of #7750
Inline bitpacking mini-block decompression currently enters the non-empty unchunk path for zero values, which expects an inline bit-width header and panics on an empty payload. Return an empty
FixedWidthDataBlockwith the configured bit width instead.This is the generic zero-value codec prerequisite used when sparse pages project to no leaf values. It contains no sparse format or layout behavior.
Validation:
cargo fmt --all -- --checkcargo test -p lance-encoding encodings::physical::bitpacking::testcargo test -p lance-encodingcargo clippy -p lance-encoding --tests --benches -- -D warningscargo clippy --all --tests --benches -- -D warningsSummary by CodeRabbit
Bug Fixes
Tests