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


##########
processing/src/main/java/org/apache/druid/query/groupby/GroupByQueryQueryToolChest.java:
##########
@@ -651,9 +650,10 @@ 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++) {
+                if (!results.hasNext()) {
+                  throw new ISE("Ran out of objects while reading postaggs 
from cache!");

Review Comment:
   I've changed it to `DruidException` - I was just following the error 
handling which was already in this method; there is another `ISE` a few lines 
below and `fetchAggregatorsFromCache` also throws an `ISE`
   
   



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