emilk commented on issue #6360: URL: https://github.com/apache/arrow-rs/issues/6360#issuecomment-2498424365
The new approach of `fn shrink_to_fit(&mut self)` works well: https://github.com/apache/arrow-rs/pull/6790 The only thing left to implement is to handle the case of a shared `ArrayRef`, which I see three paths forward on: A) ignore it (if it is shared, we can't free up memory) B) Clone the contents with a call to `self.slice(0, self.len())` and then call `.shrink_to_fit` on the results (will only work if `slice` returns a non-shared `ArrayRef`) C) Add `trait Table { fn clone(&self) -> Box<dyn Array>` and then call that in the shared case, and call `.shrink_to_fit` on the result (bullet-proof). I'm actually happy with any of these three paths. Please take a look at https://github.com/apache/arrow-rs/pull/6790 and tell me what you think. I find it a rather clean approach, as it doesn't require the dynamic downcasting of `arrow-select` -- 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]
