viirya commented on PR #2915: URL: https://github.com/apache/arrow-rs/pull/2915#issuecomment-1289598531
> I think I am missing something. I don't think there is a way to avoid copying and attaching back - this is what MutableArrayData does also? I did create #1981 a while back to track allowing mutation of arrays, but currently there isn't any support for this? Oh, no, copying is unavoidable. I meant that I need to create an array first and take value value from it. I feel that it is not smooth in usage as letting MutableArrayData to handle it as the proposed API. Just my preference. > > Still copying dictionary value array with another MutableArrayData > > This is the step I don't understand, what is this operation you are implementing here? Why are you using MutableArrayData for this at all? We reuse array allocation generally. But for certain operations, we need to hold on and wait for all arrays before we can do the operation. So we need to copy arrays there otherwise they will be overwritten. But while MutableArrayData extends DictionaryArray, it doesn't copy the value array (if only one DictionaryArray there). -- 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]
