Skip to content

GH-46177: [C++][Compute] Enable MemAllocation::PREALLOCATE for DenseUnion, SparseUnion, ListView, LargeListView, BinaryView, StringView #46317

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

andishgar
Copy link
Contributor

@andishgar andishgar commented May 5, 2025

Rationale for this change

As mentioned here, there is no preallocation strategy for the following types in compute API: ListView, LargeListView, BinaryView, StringView, DenseUnion, SparseUnion

What changes are included in this PR?

Enable MemAllocation::PREALLOCATE for the types mentioned above.

Are these changes tested?

I run the relevant unit tests.

Are there any user-facing changes?

No

@andishgar andishgar marked this pull request as draft May 5, 2025 09:52
@andishgar andishgar force-pushed the add-new-type-to-compute branch from cb0f7ec to 426d890 Compare May 6, 2025 07:54
@andishgar
Copy link
Contributor Author

I understand that I should revise the following comments, but I’d prefer someone else to do it, as I’m not fluent in English.

// It is valid for the data to not be preallocated but the validity bitmap
// is (or is computed using the intersection/bitwise-and method).
//
// For variable-size output types like BinaryType or StringType, or for
// nested types, this option has no effect.
PREALLOCATE,
// The kernel is responsible for allocating its own data buffer for
// fixed-width type outputs.
NO_PREALLOCATE

@andishgar andishgar marked this pull request as ready for review May 6, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant