walterddr commented on code in PR #10214:
URL: https://github.com/apache/pinot/pull/10214#discussion_r1107359482


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -181,11 +184,58 @@ private BrokerResponseNative handleRequest(long 
requestId, String query,
         sqlNodeAndOptions.getParseTimeNs() + (executionEndTimeNs - 
compilationStartTimeNs));
     brokerResponse.setTimeUsedMs(totalTimeMs);
     brokerResponse.setResultTable(queryResults);
+
+    attachMetadataToResponse(metadata, brokerResponse);

Review Comment:
   2 lines below `augmentStatistics(requestContext, brokerResponse);` is doing 
exactly this. can we change it to:
   
   - make `submitAndReduce` method accept `requestContext`
   - inside `submitAndReduce` call a util method `parserMetadata(metadata, 
requestContext)`
       - set the appropriate metadata keys directly into the requestContext 
just like how normal broker request handler do
       - print out logs for the operator statistics (or create a placeholder 
function to process operator statistics)
   - no change should be needed from the top level as you already set the stats 
into `requestContext`



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