-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature] Support select vector index #48521
Conversation
b1fd761
to
0963cbb
Compare
...e/src/main/java/com/starrocks/sql/optimizer/rule/transformation/RewriteToVectorPlanRule.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/com/starrocks/sql/optimizer/rule/transformation/RewriteToVectorPlanRule.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/com/starrocks/sql/optimizer/rule/transformation/RewriteToVectorPlanRule.java
Show resolved
Hide resolved
...e/src/main/java/com/starrocks/sql/optimizer/rule/transformation/RewriteToVectorPlanRule.java
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/sql/StatementPlanner.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/com/starrocks/sql/plan/PlanFragmentBuilder.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/com/starrocks/sql/optimizer/rule/transformation/RewriteToVectorPlanRule.java
Outdated
Show resolved
Hide resolved
be/src/exprs/math_functions.cpp
Outdated
|
||
auto pattern = ColumnHelper::get_const_value<TYPE_VARCHAR>(base); | ||
|
||
std::string pattern_str = pattern.to_string(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could replace string
with string_view
, then we needn't create a new std::string
and the following invocations of substr
needn't copy anymore.
std::string pattern_str = pattern.to_string(); | |
std::string_view pattern_str = pattern.to_string(); |
0963cbb
to
8e76d2f
Compare
232597f
to
f1dc60b
Compare
811eff7
to
4af4980
Compare
Signed-off-by: yulongzhao <[email protected]>
Signed-off-by: yulongzhao <[email protected]>
4af4980
to
fbe8cf6
Compare
Quality Gate passedIssues Measures |
[BE Incremental Coverage Report]✅ pass : 272 / 335 (81.19%) file detail
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 248 / 267 (92.88%) file detail
|
@ZiheLiu CREATE TABLE select id, approx_l2_distance([1,1,1,1,1], vector1) score ,vector1 from t_test_vector_table order by score org.jkiss.dbeaver.model.sql.DBSQLException: SQL 错误 [1064] [42000]: Internal error: [2024-09-10 17:56:24] /root/tenann/tenann/searcher/faiss_hnsw_ann_searcher.cc:304: Error: Error in virtual void faiss::IndexHNSW::search(faiss::Index::idx_t, const float*, faiss::Index::idx_t, float*, faiss::Index::idx_t*, const faiss::SearchParameters*) const at /var/local/thirdparty/src/faiss-1.7.3/faiss/IndexHNSW.cpp:291: Error: 'k > 0' failed
|
@sharfy For vector index searches, it's meaningless without a limit k. However, in cases where limit k is not set, a fallback should be implemented to avoid throwing errors |
Signed-off-by: yulongzhao <[email protected]>
Support select vector index
Fixes #46678
TODO:
What type of PR is this:
Does this PR entail a change in behavior?