Goal
Land the native sparse structural page layout in Lance file format 2.3 through a sequence of reviewable, independently testable pull requests.
Sparse nested data currently produces much more repetition/definition information than visible leaf data. This either forces full-zip, which is inefficient for sparse reads, or splits the structure into many small pages. SparseLayout solves this by storing Arrow structure as native slot-domain mappings instead of a dense rep/def event stream.
Current status
The implementation stack has landed on main:
This tracker remains open for the proposal and format-vote bookkeeping in format proposal #7631, the pre-2.3 cascading-compression follow-up in #7886, and closing the superseded prototype #7628.
Context
The prototype validates the complete direction:
- Structural layers are ordered outer-most to inner-most.
- Position sets support empty, all, range, and explicit representations.
- List counts support empty, constant, and explicit representations.
- Validity can store either valid or null positions, selected by encoded cost.
- Leaf values remain mini-block compressed.
- Readers project requested row ranges through structural layers and only read intersecting value chunks.
- Lance 2.2 remains unchanged; writers may emit sparse pages only in 2.3+.
On the 100M-row S3 prototype:
- Uniform sparse data was 26.5x smaller than mini-block and 4,277x smaller than full-zip.
- Deep sparse nested data was 334x smaller than mini-block and 872x smaller than full-zip.
- Warm random take on deep sparse data was 85.9x faster than mini-block and 183x faster than full-zip.
- HNSW-shaped data showed smaller but still positive size and scan improvements, with random take near parity.
The final integration benchmark is recorded in #7756. The prototype numbers remain evidence for the design and are not relabeled as measurements of the merged head.
Merge principles
- Introduce the final wire contract once. Do not merge intermediate draft representations.
- Land reader support before any production writer can emit sparse pages.
- Include malformed-input validation with the reader, not as a later hardening PR.
- Keep explicit writer support separate from automatic layout selection.
- Preserve all Lance 2.2 behavior.
- Do not make ordinary dense 2.3 writes pay for sparse planning.
- Keep sparse implementation in dedicated modules instead of expanding
primitive.rs and repdef.rs further.
Pull request stack
The five planned deliverables are complete. The reader and explicit-writer work were consolidated during landing:
Follow-up work
Format merge gates
This issue is complete when the remaining unchecked items above are resolved, any required pre-2.3 wire-contract follow-up is complete, and #7628 is closed as superseded.
Goal
Land the native sparse structural page layout in Lance file format 2.3 through a sequence of reviewable, independently testable pull requests.
Sparse nested data currently produces much more repetition/definition information than visible leaf data. This either forces full-zip, which is inefficient for sparse reads, or splits the structure into many small pages.
SparseLayoutsolves this by storing Arrow structure as native slot-domain mappings instead of a dense rep/def event stream.Current status
The implementation stack has landed on
main:mainthrough feat(format): read and write sparse structural pages #7889, and the separate feat(encoding): write sparse structural pages explicitly #7755 was closed as absorbed.This tracker remains open for the proposal and format-vote bookkeeping in format proposal #7631, the pre-2.3 cascading-compression follow-up in #7886, and closing the superseded prototype #7628.
Context
The prototype validates the complete direction:
On the 100M-row S3 prototype:
The final integration benchmark is recorded in #7756. The prototype numbers remain evidence for the design and are not relabeled as measurements of the merged head.
Merge principles
primitive.rsandrepdef.rsfurther.Pull request stack
The five planned deliverables are complete. The reader and explicit-writer work were consolidated during landing:
refactor(encoding): clarify mini-block repdef budget— Merged in refactor(encoding): clarify mini-block repdef budget #7751.fix(encoding): decode empty inline-bitpacked blocks— Merged in fix(encoding): decode empty inline-bitpacked blocks #7752.mainthrough feat(format): read and write sparse structural pages #7889.perf(encoding): auto-select sparse structural pages— Merged in perf(encoding): auto-select sparse structural pages #7756.Follow-up work
Format merge gates
SparseLayoutin pre-2.3 files.This issue is complete when the remaining unchecked items above are resolved, any required pre-2.3 wire-contract follow-up is complete, and #7628 is closed as superseded.