Skip to content

feat: enable the fragment reuse index on stable row id datasets - #9120

Draft
brendanclement wants to merge 3 commits into
lance-format:mainfrom
brendanclement:brendanclement/oss-2189-enable-fragment-reuse-index-even-when-srid-is-enabled
Draft

feat: enable the fragment reuse index on stable row id datasets#9120
brendanclement wants to merge 3 commits into
lance-format:mainfrom
brendanclement:brendanclement/oss-2189-enable-fragment-reuse-index-even-when-srid-is-enabled

Conversation

@brendanclement

Copy link
Copy Markdown
Contributor

Closes #8977

Depends on #9119.

@github-actions github-actions Bot added A-python Python bindings A-index Vector index, linalg, tokenizer A-format On-disk format: protos and format spec docs format-change A change to the format spec, which requires a vote. Remove if minor (e.g. fixing typo). enhancement New feature or request labels Sep 10, 2026
@brendanclement
brendanclement force-pushed the brendanclement/oss-2189-enable-fragment-reuse-index-even-when-srid-is-enabled branch from 6b5f3f0 to ec31dd7 Compare September 10, 2026 05:18
…d tables

Reserve reader/writer feature flag 1 << 9 for a table version that uses
stable row ids and carries a fragment reuse index. The index records how
physical row addresses moved; entries of an index that stores stable row
ids must not be remapped through it, so builds without domain-aware index
loading must refuse such a table. This build defines the bit but does not
support it yet; support lands with the implementation.

Part of lance-format#8977
On a stable-row-id dataset most indices store stable row ids, which a
fragment reuse index must not remap: stable ids start at 0 and collide
with fragment 0's row addresses. Index loading, merging and building now
hand the fragment reuse index only to indices that store row addresses.
Cleanup and remap_column_index treat stable-id indices as needing only
their fragment coverage repaired, and the manifest build derives the
FLAG_FRAG_REUSE_WITH_STABLE_ROW_IDS compatibility flag, which this build
now supports.

A JSON index answers in its target's domain; both domain predicates now
follow the target, and malformed JSON details are an error rather than a
guess. Under stable row ids the rewrite branch no longer recalculates the
fragment reuse index's own coverage, which the eager path never touched.
Compaction with defer_index_remap no longer rejects stable row ids. The
row addresses the fragment reuse index records are derived from the
fragment metadata (every physical row minus the deletion vector), which
is what the scan yields without stable row ids, while the row id
sequences are rechunked as before.

Closes lance-format#8977
@brendanclement
brendanclement force-pushed the brendanclement/oss-2189-enable-fragment-reuse-index-even-when-srid-is-enabled branch from ec31dd7 to 1b17fdc Compare September 10, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-format On-disk format: protos and format spec docs A-index Vector index, linalg, tokenizer A-python Python bindings enhancement New feature or request format-change A change to the format spec, which requires a vote. Remove if minor (e.g. fixing typo).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Fragment Reuse Index even when SRID is enabled

1 participant