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


##########
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:
   Got it. Reverted the changes for `DurableStorageDestination` type as we want 
to report 0 value counters only for ingest queries



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