fix: report error when hints not supported (#38717)

issue: #38705

---------

Signed-off-by: chasingegg <chao.gao@zilliz.com>
pull/38755/head
Gao 2024-12-25 19:02:56 +08:00 committed by GitHub
parent c7ea09a8be
commit 363d7f31ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 4 deletions

View File

@ -55,12 +55,26 @@ ProtoParser::PlanNodeFromProto(const planpb::PlanNode& plan_node_proto) {
query_info_proto.materialized_view_involved();
// currently, iterative filter does not support range search
if (!search_info.search_params_.contains(RADIUS)) {
search_info.iterative_filter_execution =
(query_info_proto.hints() == ITERATIVE_FILTER);
if (query_info_proto.hints() != "") {
if (query_info_proto.hints() == ITERATIVE_FILTER) {
search_info.iterative_filter_execution = true;
} else {
// check if hints is valid
PanicInfo(ConfigInvalid,
"hints: {} not supported",
query_info_proto.hints());
}
}
if (!search_info.iterative_filter_execution &&
search_info.search_params_.contains(HINTS)) {
search_info.iterative_filter_execution =
(search_info.search_params_[HINTS] == ITERATIVE_FILTER);
if (search_info.search_params_[HINTS] == ITERATIVE_FILTER) {
search_info.iterative_filter_execution = true;
} else {
// check if hints is valid
PanicInfo(ConfigInvalid,
"hints: {} not supported",
search_info.search_params_[HINTS]);
}
}
}