Jackie-Jiang commented on code in PR #14806:
URL: https://github.com/apache/pinot/pull/14806#discussion_r1915937215


##########
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'm not a big fan of functional API (don't really know what's happening 
behind the scene, and higher overhead), so I'd suggest just using the old 
fashioned way of creating a set and calling `addAll()`



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to