JunRuiLee commented on code in PR #537:
URL: https://github.com/apache/paimon-rust/pull/537#discussion_r3612396208
##########
crates/paimon/src/table/vector_search_builder.rs:
##########
@@ -588,8 +635,9 @@ impl<'a> VectorSearchBuilder<'a> {
Some(names) => {
for name in names {
if name == PKEY_VECTOR_POSITION_COLUMN
- || name == PKEY_VECTOR_SCORE_COLUMN
+ || name == SEARCH_SCORE_COLUMN
Review Comment:
Good catch — fixed in e3dbea0. `resolve_materialize_read_type` now runs the
reserved-name check on the **resolved** field list (both the
explicit-projection and default cases), so a user column literally named
`__paimon_search_score` / `_PKEY_VECTOR_SCORE` is rejected before it can
collide with the appended score column. The raw-request check is kept for the
explicit-projection path so a requested reserved name still gets the clear
"reserved column" error rather than a confusing "not found" from field
resolution. Added default-projection collision coverage for both the
primary-key and data-evolution materialization paths.
##########
crates/paimon/src/table/vector_search_builder.rs:
##########
@@ -283,10 +282,58 @@ impl<'a> VectorSearchBuilder<'a> {
}
}
- Err(crate::Error::DataInvalid {
- message: "vector search read is only supported for primary-key
vector indexes".into(),
- source: None,
- })
+ // Data-evolution (global-index) vector search: materialize rows from
the
+ // scored global row-ids and attach the unified score column. A
non-vector
+ // column or a set filter fails loud inside execute_scored below.
+ self.execute_de_vector_read().await
Review Comment:
Fixed in e3dbea0. `execute_read` on the data-evolution path now validates up
front that the target column exists and is a FLOAT vector column
(`ARRAY<FLOAT>` or `VECTOR<FLOAT>`) before doing any search, so an unknown,
scalar, or non-float (e.g. `ARRAY<INT>`) column fails loud with `InvalidInput`
instead of surfacing as an empty EOF reader through the C API.
`execute_scored`'s existing empty-on-unknown-field behavior is left unchanged.
Added core coverage (unknown / scalar / non-float-array) and C FFI coverage
(unknown and scalar columns mapping to `InvalidInput`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]