ankitsultana commented on code in PR #16641:
URL: https://github.com/apache/pinot/pull/16641#discussion_r2308219132


##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java:
##########
@@ -295,10 +298,12 @@ public void processTimeSeriesQueryEngine(Map<String, 
String> queryParams, @Suspe
       String language = queryParams.get(Request.LANGUAGE);
       String queryString = queryParams.get(Request.QUERY);
       try (RequestScope requestContext = 
Tracing.getTracer().createRequestScope()) {
-        PinotBrokerTimeSeriesResponse response = 
executeTimeSeriesQuery(language, queryString, queryParams,
+        TimeSeriesBlock timeSeriesBlock = executeTimeSeriesQuery(language, 
queryString, queryParams,
             requestContext, makeHttpIdentity(requestCtx), httpHeaders);
-        asyncResponse.resume(response.toBrokerResponse());
+        
asyncResponse.resume(TimeSeriesResponseMapper.toBrokerResponse(timeSeriesBlock));
       }
+    } catch (QueryException e) {
+      asyncResponse.resume(TimeSeriesResponseMapper.toBrokerResponse(e));
     } catch (Exception e) {
       LOGGER.error("Caught exception while processing POST timeseries 
request", e);
       
_brokerMetrics.addMeteredGlobalValue(BrokerMeter.UNCAUGHT_POST_EXCEPTIONS, 1L);

Review Comment:
   We can revisit it later. But yeah I think we should attempt to return a well 
formed response in all cases



-- 
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]

Reply via email to