Returns up to k rows matching right_col in right_table for each input vector in left_col. Since you don't pass in a left_table to this function, you can pass in any scalar argument as left_col which allows you to use this function both in a lateral join or with a constant.
Now that https://github.com/duckdb/duckdb/pull/12834 and https://github.com/duckdb/duckdb/pull/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: