gortiz commented on code in PR #14806:
URL: https://github.com/apache/pinot/pull/14806#discussion_r1917371935


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -199,8 +201,15 @@ protected BrokerResponse handleRequest(long requestId, 
String query, SqlNodeAndO
     }
 
     DispatchableSubPlan dispatchableSubPlan = queryPlanResult.getQueryPlan();
-    Set<String> tableNames = queryPlanResult.getTableNames();
 
+    Set<QueryServerInstance> servers = 
dispatchableSubPlan.getQueryStageList().stream()
+        .map(DispatchablePlanFragment::getServerInstances)
+        .reduce(new HashSet<QueryServerInstance>(), (all, some) -> {
+          all.addAll(some);
+          return all;
+        });

Review Comment:
   I think any of the 3 versions I suggested is easy to read (probably more 
than a for loop)



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