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

Merged
merged 7 commits into from
Feb 14, 2025
Merged

feat(planner): match vector indexes #874

merged 7 commits into from
Feb 14, 2025

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]>
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]>
Copy link
Member

@wangrunji0408 wangrunji0408 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@wangrunji0408 wangrunji0408 added this pull request to the merge queue Feb 14, 2025
Merged via the queue into main with commit f12ea23 Feb 14, 2025
5 checks passed
@wangrunji0408 wangrunji0408 deleted the skyzh/match-index branch February 14, 2025 12:59
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