tustvold commented on issue #506:
URL: https://github.com/apache/arrow-rs/issues/506#issuecomment-870466395


   So another option I've been thinking about, is instead of optimizing the 
RecordBatches after the fact, to optionally generate better RecordBatches in 
the first place. This is similar to what is proposed in #504 but perhaps more 
general.
   
   The basic idea would be to extend MutableArrayData with a flag to recompute 
dictionaries on freeze, I already have a fairly good idea of how to implement 
this. Variants of the concat, take, etc... kernels could then make use of this. 
An optimize batch function would effectively be just this variant take kernel. 
   
   Additionally DataFusion operators such as 
[SortPreservingMerge](https://github.com/apache/arrow-datafusion/blob/master/datafusion/src/physical_plan/sort_preserving_merge.rs#L433)
 that use MutableArrayData directly could also benefit from this.
   
   I'd be happy to implement this if people are happy for me to


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


Reply via email to