Skip to content
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

fix: report error when hints not supported #38730

Merged
merged 2 commits into from
Dec 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions internal/core/src/query/PlanProto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,26 @@
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;

Check warning on line 71 in internal/core/src/query/PlanProto.cpp

View check run for this annotation

Codecov / codecov/patch

internal/core/src/query/PlanProto.cpp#L70-L71

Added lines #L70 - L71 were not covered by tests
} else {
// check if hints is valid
PanicInfo(ConfigInvalid,

Check warning on line 74 in internal/core/src/query/PlanProto.cpp

View check run for this annotation

Codecov / codecov/patch

internal/core/src/query/PlanProto.cpp#L74

Added line #L74 was not covered by tests
"hints: {} not supported",
search_info.search_params_[HINTS]);
}
}
}

Expand Down
Loading