bert-beyondloops commented on PR #21934:
URL: https://github.com/apache/datafusion/pull/21934#issuecomment-4489720568

   @Jefffrey Hi, you mean something like this approach : 
   
   ```
   pub fn copy_array_data(arr: &dyn Array) -> ArrayRef {
       let src_data = arr.to_data();
       let mut copy = MutableArrayData::new(vec![&src_data], true, 
src_data.len());
       copy.extend(0, 0, src_data.len());
       compact_view_buffers(make_array(copy.freeze()))
   }
   ```
   
   In this way I have to change the signature of the copy_array_data method.
   It internally really needs the specific Array implementations in order to 
call the gc() methods on it.
   (I want to reuse the different gc implementations on some array types)
   
   There is only 1 external caller on this method in the mix_max aggregates 
space, so that seems ok to change as well.
   (So this call benefits as well from the compaction fix)
   
   Or do you still see another approach?
   


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