real-mj-song commented on code in PR #14917:
URL: https://github.com/apache/pinot/pull/14917#discussion_r1931189114
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -269,11 +271,17 @@ protected BrokerResponse handleRequest(long requestId,
String query, SqlNodeAndO
requestContext.setErrorCode(QueryException.EXECUTION_TIMEOUT_ERROR_CODE);
return new
BrokerResponseNative(QueryException.EXECUTION_TIMEOUT_ERROR);
} catch (Throwable t) {
+ ProcessingException queryException =
QueryException.QUERY_EXECUTION_ERROR;
+ if (t instanceof BadQueryRequestException) {
+ // provide more specific error code if available
+ queryException = QueryException.QUERY_VALIDATION_ERROR;
Review Comment:
For `SingleStageBrokerRequestHandler`, this is not needed because
`BadQueryRequestException` thrown by `ServerQueryExecutorV1Impl` is stored in
BrokerResponseNative object. It's directly parsed in
PinotClientRequest::getPinotQueryResponse.
For this `MultiStageBrokerRequestHandler`, this was needed because query was
handled by `_queryDispatcher.submitAndReduce`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]