[python] Infer multimodal vector columns by query dimension - #9553
Merged
JingsongLi merged 3 commits intoSep 3, 2026
Merged
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Improve multimodal vector search ergonomics by resolving the target vector column using the query vector’s dimension, and by tightening validation/error reporting for ambiguous or invalid vector-column selections.
Changes:
- Infer vector column by matching query dimension to
FixedSizeListType.list_sizewhencolumnis not provided. - Validate explicitly provided
column(exists, fixed-size vector type, matching dimension). - Enforce consistent dimensions across all queries in
search_vectors()and raise clearer errors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| paimon-python/pypaimon/multimodal/table.py | Implements _resolve_vector_column() and updates search() / search_vectors() to use dimension-based resolution + stronger validation. |
| paimon-python/pypaimon/tests/multimodal_table_test.py | Adds coverage for dimension-based inference, ambiguous matches, and new validation error paths. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
+1 |
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.
Purpose
Closes #9552.
MultimodalTable.search()andsearch_vectors()currently infer a vector column only when the schema contains one fixed-size vector field. Callers still need to passcolumnwhen multiple vector fields have different dimensions, even though the query dimension can identify one field.This PR resolves vector columns by matching the query dimension to
FixedSizeListType.list_size. It also validates explicitly selected columns and rejects mixed dimensions insearch_vectors(). Multiple columns with the same dimension remain ambiguous and requirecolumn.Tests
pypaimon/tests/multimodal_table_test.py: 80 passedgit diff --check