Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate MutableArrayData #2832

Closed
tustvold opened this issue Oct 6, 2022 · 4 comments
Closed

Deprecate MutableArrayData #2832

tustvold opened this issue Oct 6, 2022 · 4 comments
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@tustvold
Copy link
Contributor

tustvold commented Oct 6, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

MutableArrayData provides an API to copy chunks of data from source arrays into an output array, it is extremely flexible, however, its performance leaves a lot to be desired. In particular its reliance on dynamic dispatch per-run not only incurs dispatch overheads, but prevents the compiler from properly vectorising the code. There are also a number of other issues relating to capacity allocation (#347), null mask handling (#1230), dictionary handling (#506)

There has been a fairly concerted effort over the last year or so to move away from use of MutableArrayData:

  • Improvements to the Array Builders
  • Ability to construct Array from iterators
  • Specialized take and filter kernels that only use MutableArrayData as a fallback for nested types

Describe the solution you'd like

I would like to eventually deprecate and remove MutableArrayData. I think the only major blockers to this are:

Describe alternatives you've considered

Additional context

This can be viewed through the lens of porting @jorgecarleitao 's ideas from arrow2 and bringing them into arrow-rs

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Oct 6, 2022
@viirya
Copy link
Member

viirya commented Oct 24, 2022

Hm, except for MutableArrayData, is there a way to easily copy arrays?

@tustvold
Copy link
Contributor Author

The hope was that all use-cases would be covered by a combination of the take, filter and interleave kernels

@viirya
Copy link
Member

viirya commented Oct 24, 2022

The most close one is take. But I quickly take a look and seems it is not as efficient as MutableArrayData for simple copy usage, although I don't run a formal benchmark to verify it.

@tustvold
Copy link
Contributor Author

I think I have made peace with the existence of MutableArrayData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

No branches or pull requests

2 participants