ankitsultana commented on code in PR #16641:
URL: https://github.com/apache/pinot/pull/16641#discussion_r2291839012
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BrokerRequestHandlerDelegate.java:
##########
@@ -124,14 +124,14 @@ public BrokerResponse handleRequest(JsonNode request,
@Nullable SqlNodeAndOption
}
@Override
- public PinotBrokerTimeSeriesResponse handleTimeSeriesRequest(String lang,
String rawQueryParamString,
+ public TimeSeriesBlock handleTimeSeriesRequest(String lang, String
rawQueryParamString,
Map<String, String> queryParams, RequestContext requestContext,
RequesterIdentity requesterIdentity,
HttpHeaders httpHeaders) {
if (_timeSeriesRequestHandler != null) {
return _timeSeriesRequestHandler.handleTimeSeriesRequest(lang,
rawQueryParamString, queryParams, requestContext,
requesterIdentity, httpHeaders);
}
- return new PinotBrokerTimeSeriesResponse("error", null, "error", "Time
series query engine not enabled.");
+ throw new UnsupportedOperationException("Time series query engine not
enabled.");
Review Comment:
I think this breaks the existing error handling convention slightly.
Ideally we should return a proper response on all caught errors (e.g. before
we were returning PinotBrokerTimeSeriesResponse)
After this PR I see that `handleTimeSeriesRequest` can throw, which will
lead to the method `executeTimeSeriesQuery` throwing too, which will finally
get reported as an uncaught post error.
--
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]