cryptoe commented on code in PR #15674:
URL: https://github.com/apache/druid/pull/15674#discussion_r1452958288


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/util/SqlStatementResourceHelper.java:
##########
@@ -221,16 +216,24 @@ private static Optional<List<PageInformation>> 
populatePagesForDurableStorageDes
       throw DruidException.defensive("Expected worker count to be set for 
stage[%d]", finalStage);
     }
 
-
     List<PageInformation> pages = new ArrayList<>();
+
+
+    Set<Integer> emptyWorkerCounters = new HashSet<>();
+
     for (int partitionNumber = 0; partitionNumber < totalPartitions; 
partitionNumber++) {
       for (int workerNumber = 0; workerNumber < totalWorkerCount; 
workerNumber++) {
         CounterSnapshots workerCounter = workerCounters.get(workerNumber);
+        if ((workerCounter == null || workerCounter.isEmpty()) && 
!emptyWorkerCounters.contains(workerNumber)) {
+          pages.add(new PageInformation(pages.size(), 0L, 0L, workerNumber, 
null));
+          emptyWorkerCounters.add(workerNumber);

Review Comment:
   I donot understand why we require a hashSet here. 
   Also, DurableStorageDestination is only for selects and not inserts. Not 
sure if changes are required here. 



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/util/SqlStatementResourceHelper.java:
##########
@@ -221,16 +216,24 @@ private static Optional<List<PageInformation>> 
populatePagesForDurableStorageDes
       throw DruidException.defensive("Expected worker count to be set for 
stage[%d]", finalStage);
     }
 
-
     List<PageInformation> pages = new ArrayList<>();
+

Review Comment:
   nit:Extra spaces. 



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