gabotechs commented on code in PR #16816:
URL: https://github.com/apache/datafusion/pull/16816#discussion_r2221469424


##########
datafusion/functions-aggregate/src/array_agg.rs:
##########
@@ -315,11 +313,7 @@ impl Accumulator for ArrayAggAccumulator {
         };
 
         if !val.is_empty() {
-            // The ArrayRef might be holding a reference to its original input 
buffer, so
-            // storing it here directly copied/compacted avoids over 
accounting memory
-            // not used here.
-            self.values
-                .push(make_array(copy_array_data(&val.to_data())));

Review Comment:
   After this change 
https://github.com/apache/datafusion/pull/16816/files#diff-614f73bd02b93c736f118e06e15d6ebfbb8c570b2f9f21f969659e7a04ab843aL381-R375,
 not needed.
   
   https://github.com/apache/datafusion/pull/16519 introduced compacting in 
this same aggregate function in other missing places, but we found out that it 
was very inefficient, so it hasn't been merged, so this is the alternative 
solution.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to