Skip to content

fix(index): error on missing partition column in RQ transform - #9391

Open
LuciferYang wants to merge 3 commits into
lance-format:mainfrom
LuciferYang:fix/ivf-rq-rq-part-col-error
Open

LuciferYang wants to merge 3 commits into
lance-format:mainfrom
LuciferYang:fix/ivf-rq-rq-part-col-error

Conversation

@LuciferYang

Copy link
Copy Markdown
Contributor

Closes #9390

RQTransformer::transform read __ivf_part_id with batch[PART_ID_COLUMN], which panics when the column is absent, while the vector column and __ivf_centroid_dist in the same function return a column not found in batch error. Both partition-id reads now go through column_by_name and return that same error, so a public transformer handed an incomplete batch fails instead of panicking.

Nothing changes for a batch that has the column, which is every batch the IVF transform chain produces.

How was this patch tested?

test_rq_transformer_reports_missing_partition_column calls the transformer with the vector and centroid-distance columns but no partition column and asserts the error names the column. It sits next to the existing multi-bit factor test and reuses its fixture shape. Putting the indexing operator back makes the test panic at that line instead.

Two branches of RQTransformer::transform fetched PART_ID_COLUMN via
RecordBatch indexing (panicking with an undecorated arrow error when
absent) while the same function returned descriptive errors for every
other column. Use column_by_name with the same error contract.

Assisted-by: GLM-5.3
@github-actions github-actions Bot added A-index Vector index, linalg, tokenizer bug Something isn't working labels Sep 18, 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.

Both partition-ID reads now use the transform’s existing fallible column contract while preserving the residual-query/L2 path that does not require the column. The regression test verifies the current raw-query path returns an Index error naming the missing column. I found no acceptance blocker.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-index Vector index, linalg, tokenizer bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: the RQ transform panics instead of erroring when the partition column is missing

1 participant