From 9e5fe84e9f0560df82bd3a3b62d891e1d5a7d0fd Mon Sep 17 00:00:00 2001 From: Wish Date: Tue, 8 Oct 2024 16:53:08 +0800 Subject: [PATCH 1/2] storage: Fix vector index not used Signed-off-by: Wish --- dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp b/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp index c727b847573..900d8433d14 100644 --- a/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp +++ b/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp @@ -84,6 +84,13 @@ RSOperatorPtr RSOperator::build( if (likely(rs_operator != DM::EMPTY_RS_OPERATOR)) LOG_DEBUG(tracing_logger, "Rough set filter: {}", rs_operator->toDebugString()); + ANNQueryInfoPtr ann_query_info = nullptr; + if (dag_query->ann_query_info.query_type() != tipb::ANNQueryType::InvalidQueryType) + ann_query_info = std::make_shared(dag_query->ann_query_info); + + if (ann_query_info != nullptr) + rs_operator = wrapWithANNQueryInfo(rs_operator, ann_query_info); + return rs_operator; } From 00dcbde252097a71f1b10b0306b75b50d16cc6cd Mon Sep 17 00:00:00 2001 From: JaySon-Huang Date: Tue, 8 Oct 2024 17:47:01 +0800 Subject: [PATCH 2/2] Format --- dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp b/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp index 900d8433d14..f9f93510b6d 100644 --- a/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp +++ b/dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp @@ -90,7 +90,7 @@ RSOperatorPtr RSOperator::build( if (ann_query_info != nullptr) rs_operator = wrapWithANNQueryInfo(rs_operator, ann_query_info); - + return rs_operator; }