From b5d4cc16056890374dbb8b275eb4443dfc1bc251 Mon Sep 17 00:00:00 2001 From: chasingegg Date: Tue, 24 Dec 2024 20:01:43 +0800 Subject: [PATCH 1/2] fix: report error when hints not supported Signed-off-by: chasingegg --- internal/core/src/query/PlanProto.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/internal/core/src/query/PlanProto.cpp b/internal/core/src/query/PlanProto.cpp index 72597258b06c3..0606806a0be55 100644 --- a/internal/core/src/query/PlanProto.cpp +++ b/internal/core/src/query/PlanProto.cpp @@ -55,8 +55,16 @@ 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 = From 1342f38d5f04eb9727d55ae512232f5be27f1988 Mon Sep 17 00:00:00 2001 From: chasingegg Date: Wed, 25 Dec 2024 10:38:58 +0800 Subject: [PATCH 2/2] update Signed-off-by: chasingegg --- internal/core/src/query/PlanProto.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/core/src/query/PlanProto.cpp b/internal/core/src/query/PlanProto.cpp index 0606806a0be55..aa1892ef230e9 100644 --- a/internal/core/src/query/PlanProto.cpp +++ b/internal/core/src/query/PlanProto.cpp @@ -67,8 +67,14 @@ ProtoParser::PlanNodeFromProto(const planpb::PlanNode& plan_node_proto) { } 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]); + } } }