kgyrtkirk commented on code in PR #15402:
URL: https://github.com/apache/druid/pull/15402#discussion_r1399380699


##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryQueryToolChest.java:
##########
@@ -651,9 +650,7 @@ public ResultRow apply(Object input)
             );
 
             if (isResultLevelCache) {
-              Iterator<PostAggregator> postItr = 
query.getPostAggregatorSpecs().iterator();
-              int postPos = 0;
-              while (postItr.hasNext() && results.hasNext()) {
+              for (int postPos = 0; postPos < 
query.getPostAggregatorSpecs().size(); postPos++) {
                 resultRow.set(postAggregatorStart + postPos, results.next());
               }

Review Comment:
   I think the contract around here should be to restore the same row that it 
have saved into the cache - if its not able to do so; I think it should fail 
with an exception - if it doesn't do that wouldn't that cause incorrect results 
- or not?



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