Skip to content

feat(format): declare replaced offsets on DataReplacement - #9138

Draft
wkalt wants to merge 1 commit into
lance-format:mainfrom
wkalt:ticket/ent-2547/data-replacement-replaced-offsets-spec
Draft

feat(format): declare replaced offsets on DataReplacement#9138
wkalt wants to merge 1 commit into
lance-format:mainfrom
wkalt:ticket/ent-2547/data-replacement-replaced-offsets-spec

Conversation

@wkalt

@wkalt wkalt commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

A column replacement rewrites a fragment's whole column file even when only some rows changed, so last_updated_at_version moves on every row of the fragment and an incremental consumer re-reads rows whose values did not change. Update already carries updated_fragment_offset_bitmaps for the same reason; DataReplacement has no equivalent.

This adds replaced_offset_bitmaps to DataReplacement: per replaced fragment, the physical offsets whose values changed, as portable RoaringBitmap bytes. Present, only those offsets take the new version and the rest keep theirs; absent, or on a fragment with no sequence to keep, every row does, which is what every existing writer produced. Keys must name replaced fragments and offsets must be below the fragment's physical row count; anything else is rejected as invalid. The field is additive: absent decodes as a full stamp and older readers ignore it.

Spec-only per the format change process: proto, transaction.md, and the conversion edits needed to compile. The stamping and validation follow in a separate PR.

A column replacement rewrites a fragment's whole column file even when only
some rows changed, so last_updated_at_version moves on every row of the
fragment and an incremental consumer re-reads rows whose values did not
change. Update already carries updated_fragment_offset_bitmaps for the same
reason; DataReplacement has no equivalent.

This adds replaced_offset_bitmaps to DataReplacement: per replaced fragment,
the physical offsets whose values changed, as portable RoaringBitmap bytes.
Present, only those offsets take the new version and the rest keep theirs;
absent, or on a fragment with no sequence to keep, every row does, which is
what every existing writer produced. The field is additive.

Spec-only per the format change process: proto, transaction.md, and the
conversion edits needed to compile. The stamping and validation follow in a
separate PR.
@github-actions github-actions Bot added 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
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 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.

1 participant