feat: add cell flags - #8655
Draft
Xuanwo wants to merge 45 commits into
Draft
Conversation
Contributor
|
Important This PR touches the Lance format specification. Substantive changes to the format specification — the If this is a meaningful format change:
|
This was referenced Aug 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.
Why
Lance needs snapshot-versioned, field-scoped Boolean cell state that is independent of Arrow validity and ordinary column values. This PR introduces Cell Flags as a native dataset capability with stable identities, sparse per-fragment state, query expressions, explicit mutation APIs, rewrite preservation, transaction binding, and Rust/Python/Java bindings.
Cell Flags are false by absence, change only through explicit Cell Flag mutations, and commit atomically with the dataset operations that carry them.
Performance status
The complete 10M-row Local FS and S3 matrix at
1f6af401passed all integrity checks and showed substantial end-to-end, storage, request, and write-amplification improvements over an equivalent application-managed Boolean-column-plus-bitmap design. Under the accepted evaluation criteria, RSS is informational, shared paths must avoid material regression rather than win every microcase, and full-manifest metadata growth is not a strict blocker.Follow-up profiling found that cold historical checkout eagerly materialized compact Cell Flag transaction row selections. The current exact head (
488aecce) caches those inline protobuf bytes and materializes them only whenread_transaction()is requested. On the same 10M-row S3 dataset, seven exact-head samples produced:Validation
cargo fmt --all -- --checkcargo clippy --all --tests --benches -- -D warningsThe PR remains a draft for review; the implementation and benchmark evidence are available for citation.