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


##########
processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultFramedOnHeapAggregatable.java:
##########
@@ -321,7 +321,7 @@ public static Object cloneAggValue(AggregatorFactory 
aggFactory, Object value)
     Aggregator combiningAgg = 
aggFactory.getCombiningFactory().factorize(combiningFactory);
 
     combiningAgg.aggregate();
-    return combiningAgg.get();

Review Comment:
   note: I think we miss `combiningAgg.close()` here - not sure if hat 
matters...but could be fixed with a try-with-resources



##########
processing/src/main/java/org/apache/druid/query/rowsandcols/semantic/DefaultFramedOnHeapAggregatable.java:
##########
@@ -719,7 +719,7 @@ private AppendableRowsAndColumns 
aggregateWindowApertureWellBehaved(
     // End Phase 3, anything left in the window needs to be collected and put 
into our results
     for (; nextIndex < windowSize; ++nextIndex) {
       for (int i = 0; i < aggFactories.length; ++i) {
-        results[i][resultStorageIndex] = aggregators[i][nextIndex].get();

Review Comment:
   is `aggregators[i][nextIndex].close();` missing here?



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