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


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/physical/DispatchableSubPlan.java:
##########
@@ -90,7 +124,11 @@ public Map<String, Set<String>> 
getTableToUnavailableSegmentsMap() {
   public int getEstimatedNumQueryThreads() {
     int estimatedNumQueryThreads = 0;
     // Skip broker reduce root stage
-    for (DispatchablePlanFragment stage : _queryStageList.subList(1, 
_queryStageList.size())) {
+    for (Map.Entry<Integer, DispatchablePlanFragment> entry : 
_queryStageMap.entrySet()) {
+      if (entry.getKey() == 0) {
+        continue;
+      }
+      DispatchablePlanFragment stage = entry.getValue();

Review Comment:
   Yes, but we would need to allocate that treeset, right? I guess depending on 
the implementation we need to allocate a Map.Entry here, but at least probably 
doesn't require to allocate that much info.



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