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

Map BadQueryRequestException to QueryException.QUERY_VALIDATION_ERROR #14917

Merged
merged 19 commits into from
Jan 29, 2025
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
aa2f562
Reclassify BadQueryRequestException as QUERY_VALIDATION_ERROR
real-mj-song Jan 23, 2025
0114c7a
Use BadQueryRequestException for column type error for sum/max/min ag…
real-mj-song Jan 24, 2025
89de614
Update testQueryExceptions to test correct QueryException code
real-mj-song Jan 24, 2025
1d8ac33
Import style cleanup
real-mj-song Jan 24, 2025
d1257f2
Update query exception type in OfflineClusterIntegrationTest
real-mj-song Jan 24, 2025
781733d
Throws BadQueryRequestException in reducer if QUERY_VALIDATION_ERROR_…
real-mj-song Jan 25, 2025
bf47aac
Throw BadQueryRequestException for IllegalArgumentException in BaseCo…
real-mj-song Jan 25, 2025
ec7cec1
Linter fix
real-mj-song Jan 25, 2025
e0e1b09
Patch all implementations of BaseCombineOperator
real-mj-song Jan 27, 2025
713c197
Increment metrics when QUERY_EXECUTION/VALIDATION_ERROR caught in Mul…
real-mj-song Jan 27, 2025
d51a37e
Increment BrokerMeter.QUERY_VALIDATION_EXCEPTIONS metric instead
real-mj-song Jan 27, 2025
beb88e0
Throw QUERY_VALIDATION_ERROR if its error code found when processing …
real-mj-song Jan 28, 2025
520bf69
Simplify error throw logic in BaseCombineOperator
real-mj-song Jan 29, 2025
c3397d8
Increment QUERY_VALIDATION_EXCEPTIONS broker metric in single stage b…
real-mj-song Jan 29, 2025
1bce9ff
Fix static import style
real-mj-song Jan 29, 2025
4f13fb0
Handle both IllegalArgumentException and BadQueryRequestException in …
real-mj-song Jan 29, 2025
d2e85cb
Refactor using QueryInfoException
real-mj-song Jan 29, 2025
b8a42e8
Missing license header for QueryInfoException
real-mj-song Jan 29, 2025
c3b0b48
Revert QueryRunnerTest
real-mj-song Jan 29, 2025
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
Prev Previous commit
Next Next commit
Simplify error throw logic in BaseCombineOperator
real-mj-song committed Jan 29, 2025
commit 520bf695d66c7ecd93256c402f5f136575fe9f41
Original file line number Diff line number Diff line change
@@ -191,15 +191,12 @@ protected static RuntimeException wrapOperatorException(Operator operator, Runti
// Otherwise, try to get the segment name to help locate the segment when debugging query errors.
// Not all operators have associated segment, so do this at best effort.
IndexSegment segment = operator.getIndexSegment();
if (segment == null) {
if (e instanceof IllegalArgumentException) {
return new BadQueryRequestException(e);
}
return e;
String errorMessage = null;
if (segment != null) {
errorMessage = "Caught exception while doing operator: " + operator.getClass()
+ " on segment: " + segment.getSegmentName();
}

String errorMessage = "Caught exception while doing operator: " + operator.getClass()
+ " on segment: " + segment.getSegmentName();
if (e instanceof IllegalArgumentException) {
throw new BadQueryRequestException(errorMessage, e);
}