Repository navigation
Conversation
JingsongLi
left a comment
There was a problem hiding this comment.
Please separate any changes unrelated to the functionality into a distinct PR.
|
Could we support both distance bounds in this PR? A lower bound lets callers exclude near-duplicates while keeping other similar results. Lance exposes this through its lower bound, and Milvus covers the same use case with I’d use a
The indexed path and the exact fallback should apply the same boundary rules. Tests should cover both endpoints and adjacent floating-point values. I’d keep range reads uncapped in this PR. If a caller sets |
|
Thanks @JingsongLi. I updated the PR in 0ca4fb4.
The clean Maven build passed all 162 selected Core and Native tests, including boundary and adjacent floating-point cases. Both Java usage examples compiled against the rebuilt API. |
Purpose
Add uncapped distance range reads for single-vector columns on Data Evolution append tables. Engines can plan snapshot-scoped tasks and distribute them before searching. Each task streams matching row IDs and scores in bounded chunks and can read projected table rows from the same snapshot.
Usage
The single-vector and batch APIs use the same inclusive bounds.
VectorDistanceRange.atMost(max)distance <= maxVectorDistanceRange.atLeast(min)distance >= minVectorDistanceRange.closed(min, max)min <= distance <= maxBounds are finite. A closed range may have equal bounds. Result order is unspecified. Both range methods reject an explicit
withLimit(k)and branch fallback reads.Single query
Batch queries
Plan once and run
searchBatchfor each task. The callback produces the zero-based input query index and aligned row IDs and scores, with up to 4,096 hits per chunk. Use the chunk directly for metadata-only consumers or callcreateBatchReaderto read table columns.Distance means squared L2,
1 - cosine similarity, or the negative dot product according to the index metric. Set search options withwithOptionorwithOptions. Thedetailmode also evaluates uncovered rows from their original vectors. Thefastmode restricts the search to index coverage. Probe options can narrow candidate coverage, and quantized distances can move results across a boundary.Changes
Tests
The selected suites cover inclusive bounds, time travel through a tag, explicit limit and branch fallback rejection, persisted Lumina metrics, zero-distance cosine matches for identical non-axis-aligned vectors, and extreme-scale cosine queries with and without centroid routing.