shauryachats commented on code in PR #16641:
URL: https://github.com/apache/pinot/pull/16641#discussion_r2300151568
##########
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:
Correct. Since we are going ahead with returning the `TimeSeriesBlock` and
then casting to the appropriate response object, we would need to either:
- build support for errors within `TimeSeriesBlock`
- rely on exceptions to be bubbled up to the response transformation layer,
and then take the exception into account and build the appropriate response.
I feel a better way might be to introduce a new `TimeSeriesException` and
propagate that upto the response transformation layer, and then take it as
input when we create the `BrokerResponse` or `PinotBrokerTimeSeriesResponse`.
--
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]