Replies: 3 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
-
|
Two questions after the draft change by @gaurav274.
|
Beta Was this translation helpful? Give feedback.
-
|
I like it! Looks good. Regarding the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
Support index creation on columns of table.
SQL Syntax
CREATE INDEX [IF NOT EXISTS] name ON table (column1, column2 ... columnN);Initial Index Support
I plan to use HNSW index as my starting point, because it requires minimal parameter to create the index. Others all need some sort of parameters.
Discussion Questions
USING methodsyntax support. I wonder should I support this in the first PR or we can add support later but just support HNSW first?User workflow
Image Dataset
Few other queries:
Return Top-5 similar images
Search for similar images with threshold of 0.8 and also return top-5
Video Dataset
CREATE MATERIALIZED VIEW IF NOT EXISTS MyFaces (id, data, bbox) AS SELECT id, data, F.bbox FROM video LATERAL JOIN UNNEST(FaceDetector(data).bboxes) AS F(bbox);Feature requirements
CREATE INDEXcommand on features (FunctionalExpression) usingfaiss. In the first version, we can hardcode a fixed index type. In the future, we can support adding more parameters based on which index faiss index type to pick. Note, additionally, we need to keep a reverse mapping fromfaissindex number to the source table.similaritypredicate to an index scan usingfaiss. This requires matching the FunctionalExpression, retrieving the matched features from faiss, using reverse mapping to get source tablerow_id, and lastly usingrow_idto get the source table row. Since we will use primary keys for the reverse mapping, we can leverage indexes to speed up the retrievals.similaritykeyword:similarity(data1, data2, UDF, METRIC)- We can set the default value of metric to euclidean. Can easily provide metrics supported byfaiss.similaritypredicate and return the results.Future Support
create materializedcommand.Beta Was this translation helpful? Give feedback.
All reactions