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.
Now that duckdb/duckdb#12834 and duckdb/duckdb#13342 have landed in core DuckDB we can make vector search a bit easier.
This PR adds two table functions, implemented as table macros, to enable easy fuzzy joining of two vector datasets:
vss_join(left_table, right_table, left_col, right_col, k, metric := 'l2sq)
Joins the
left_table
andright_table
by matching up tok
vectors inright_col
for each vector inleft_col
, using the metricmetric
(by defaultl2sq
)vss_match(right_table, left_col, right_col, k, metric := 'l2sq')
Returns up to
k
rows matchingright_col
inright_table
for each input vector inleft_col
. Since you don't pass in aleft_table
to this function, you can pass in any scalar argument asleft_col
which allows you to use this function both in a lateral join or with a constant.Examples: