Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(planner): match vector indexes #874

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

feat(planner): match vector indexes #874

wants to merge 7 commits into from

Conversation

skyzh
Copy link
Member

@skyzh skyzh commented Jan 26, 2025

This patch adds support for create index statements on vector columns and produces vector_index_scan plans. The executors are not implemented yet.

@skyzh skyzh requested a review from wangrunji0408 January 26, 2025 20:56
@skyzh skyzh force-pushed the skyzh/match-index branch from e2a0a9e to bf8b849 Compare January 26, 2025 20:57
@skyzh skyzh force-pushed the skyzh/match-index branch from bf8b849 to 8b422e3 Compare January 26, 2025 20:58
Signed-off-by: Alex Chi <[email protected]>
src/binder/create_index.rs Outdated Show resolved Hide resolved
src/planner/mod.rs Outdated Show resolved Hide resolved
src/planner/rules/plan.rs Outdated Show resolved Hide resolved
src/planner/rules/plan.rs Show resolved Hide resolved
skyzh and others added 3 commits January 27, 2025 23:18
Co-authored-by: Runji Wang <[email protected]>
Signed-off-by: Alex Chi Z. <[email protected]>
Co-authored-by: Runji Wang <[email protected]>
Signed-off-by: Alex Chi Z. <[email protected]>
Co-authored-by: Runji Wang <[email protected]>
Signed-off-by: Alex Chi Z. <[email protected]>
@skyzh
Copy link
Member Author

skyzh commented Jan 28, 2025

Actually, vector index scan is different from index scan. The vector index scan operator has an op parameter, which is the distance function used.

However, I just realized that the op type can be inferred from the index type stored so we can remove it and make it generic.

Signed-off-by: Alex Chi <[email protected]>
@skyzh
Copy link
Member Author

skyzh commented Jan 28, 2025

ready for review :)

@skyzh
Copy link
Member Author

skyzh commented Jan 28, 2025

but there's still difference between index scan and vector index scan: for vector index scans, we need to provide a constant vector; for normal index scan, it's just the order by column

@skyzh
Copy link
Member Author

skyzh commented Jan 28, 2025

let's use a single IndexScan for now and separate them when we add a normal index scan

@skyzh skyzh requested a review from wangrunji0408 January 28, 2025 04:26
Signed-off-by: Alex Chi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants