Skip to content

Commit

Permalink
storage: Fix vector index not used (#9503)
Browse files Browse the repository at this point in the history
ref #9032

Fix ANNIndexInfo is not utilized when TiDB specifies it

Signed-off-by: Wish <[email protected]>

Co-authored-by: JaySon-Huang <[email protected]>
  • Loading branch information
breezewish and JaySon-Huang authored Oct 8, 2024
1 parent 8479d8c commit 02784a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dbms/src/Storages/DeltaMerge/Filter/RSOperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<tipb::ANNQueryInfo>(dag_query->ann_query_info);

if (ann_query_info != nullptr)
rs_operator = wrapWithANNQueryInfo(rs_operator, ann_query_info);

return rs_operator;
}

Expand Down

0 comments on commit 02784a4

Please sign in to comment.