Skip to content

feat(format): specify carried-column storage and allow carrying a keyed column - #8856

Merged
westonpace merged 1 commit into
lance-format:mainfrom
vivek-bharathan:vb/covering-storage-format
Sep 15, 2026
Merged

westonpace merged 1 commit into
lance-format:mainfrom
vivek-bharathan:vb/covering-storage-format

Conversation

@vivek-bharathan

Copy link
Copy Markdown
Contributor

#8535 declared IndexMetadata.covering_fields but left the physical side unspecified; this specifies it -- carried values are extra columns in auxiliary.idx, discovered by exclusion against the quantizer's internal columns and bound to their source fields by a new covering_field_ids metadata key, with no index_version bump.

It also permits an index to carry a column it is also keyed on, the only case where an id repeats in fields, so readers must take the carried set from covering_fields rather than subtract the keyed prefix.

Adds VectorQueryProto.covering_projection (field 15) to reserve the tag; no writer emits carried values yet, so the implementation follows separately.

@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 Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Important

Format specification vote

This PR modifies the Lance format specification, so it requires 3 binding +1 votes from PMC members (excluding the proposer) and a minimum 72-hour voting period, weekends excluded, before it can merge. Vote by approving this PR (+1) or requesting changes (−1, a veto). See the voting process.

Status: ❌ Blocked — vetoed by @westonpace

Approvals (this commit) @wjones127 (1/3) — stale, re-approve needed: @jackye1995
Vetoes @westonpace
Voting period elapsed — ended Wed 2026-09-02 20:59 UTC (13:59 PDT)

Updated automatically by the format-spec vote gate, which re-checks every 15 minutes — just voted? Re-check now (press Run workflow; leave the input blank to re-check every open format PR). A PMC member may apply the format-waived label to waive the vote for a trivial edit (typo, wording, formatting).

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Aug 28, 2026
@vivek-bharathan
vivek-bharathan force-pushed the vb/covering-storage-format branch from fb3db9d to 201a9e1 Compare August 29, 2026 00:31
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Aug 29, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate recommendation: approve.

The new optional per-segment covering projection is represented explicitly while preserving absent-state behavior, and the distributed query serializer remains compatible with the generated schema.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Aug 29, 2026

@jackye1995 jackye1995 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, please raise a corresponding voting thread

@vivek-bharathan

vivek-bharathan commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

looks good, please raise a corresponding voting thread

Happy to do that - but it looks like the process was recently changed

The pull request is the proposal. Open a PR with the specification change, and the PMC votes on it there — there is no separate design document or discussion thread to write first, and the requirement is enforced structurally in CI rather than by convention

@wjones127 wjones127 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 until the blocking questions is decided. Have you considered using field ids instead of string names / paths? If so, what made you reject that?

Comment thread protos/ann.proto Outdated
Comment thread protos/ann.proto Outdated
Comment thread protos/ann.proto Outdated
@vivek-bharathan
vivek-bharathan force-pushed the vb/covering-storage-format branch from 201a9e1 to c501e2e Compare September 5, 2026 01:30
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 5, 2026
@vivek-bharathan
vivek-bharathan force-pushed the vb/covering-storage-format branch from c501e2e to 29c957e Compare September 5, 2026 01:36

@westonpace westonpace left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good but I have a few questions. Thanks for working on this!

Comment thread docs/src/format/index/vector/index.md Outdated
Comment thread docs/src/format/index/vector/index.md Outdated
Comment thread docs/src/format/index/index.md Outdated
Comment thread docs/src/format/index/index.md Outdated
Comment thread docs/src/format/index/index.md Outdated
Comment thread docs/src/format/index/index.md Outdated
Comment thread docs/src/format/index/index.md Outdated
Comment thread protos/ann.proto Outdated
Comment thread protos/ann.proto
* presence tracking for repeated fields, and the empty list is a distinct, meaningful
* state here:
*
* * absent: no narrowing computed; materialize every covering column declared.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true? Wouldn't the default be to materialize nothing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absent means nobody computed a projection -- either an encoder older than this
field, or a planner that skipped the narrowing step. Intended to reproduce the behavior from before this field existed, when a covered index always materialized everything it declared

Comment thread protos/ann.proto
Comment on lines +69 to +71
* executor declares the same search output schema the planner did; without it the
* executor's node is wider than the plan it came from, and the surrounding nodes
* were built against the planner's narrower schema.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the need for the two sides to agree on the schema before-hand but can we do this?

If the planner has to specify the covering projection, and the available fields are determined from index storage, does this mean the planner will have to load the index into memory? Isn't that something we probably want to avoid?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct. Today it reads both index files' footers and schema metadata, plus their IVF models. But it probably makes sense to build a version that excludes the IVF models. I can do that as a follow up - I do not think that changes this PR though

@vivek-bharathan
vivek-bharathan force-pushed the vb/covering-storage-format branch from 29c957e to feace76 Compare September 8, 2026 19:05
…ed column

lance-format#8535 declared `IndexMetadata.covering_fields` but left the physical side unspecified;
this specifies it -- carried values are extra columns in `auxiliary.idx`, discovered by
exclusion against the quantizer's internal columns and bound to their dataset fields by a
new `covering_field_ids` metadata key, with no `index_version` bump.

It also permits an index to carry a column it is also keyed on. Such a column is listed
once in `fields` and named in `covering_fields`, so `covering_fields` is a subset rather
than a suffix, and readers must take the carried set from `covering_fields` rather than
subtract the keyed prefix.

Adds `VectorQueryProto.covering_projection` (field 15) to reserve the tag, with the one
initializer the new field forces on `query_to_proto`; no writer emits carried values yet,
so the implementation follows separately.
@vivek-bharathan
vivek-bharathan force-pushed the vb/covering-storage-format branch from feace76 to db9f848 Compare September 8, 2026 20:29
@vivek-bharathan

Copy link
Copy Markdown
Contributor Author

@westonpace @wjones127 - I believe all concerns are addressed now. ptal

@wjones127 wjones127 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now. Also note the change proposed in #9159 - I think that should be released alongside this.

@westonpace westonpace left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My concerns have been addressed, thanks!

@westonpace
westonpace merged commit 48ff3e6 into lance-format:main Sep 15, 2026
37 of 38 checks passed
@vivek-bharathan
vivek-bharathan deleted the vb/covering-storage-format branch September 16, 2026 00:44
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.

4 participants