Skip to content

Reduce overhead to create an Array from ArrayData (make_array) #9061

Closed

Description

@alamb

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

While looking at profiles for some of the ClickBench queries, I found that almost 1% of the query time was being spent creating record batches from ArrayData,

Screenshot 2025-12-28 at 5 27 02 PM Screenshot 2025-12-28 at 5 29 19 PM

I looked into it and i think the issue is that even though Arrays get an owned ArrayData, they still end up clone ing some things. For some arrays this isn't a big deal (a few Arc updates) for some such as StructArray and ByteViewArray it requires an extra allocation

impl From<ArrayData> for StructArray {

Describe the solution you'd like
I would like to avoid this overhead

Describe alternatives you've considered
I think we can directly construct the arrays from the relevant fields of ArrayData rather than having to clone them

Additional context

Activity

  1. added
    enhancement
    on Dec 29, 2025
  2. self-assigned this
    on Dec 29, 2025
  3. changed the title [-]Reduce overhead to create an Array from ArrayData[/-] [+]Reduce overhead to create an Array from ArrayData (`make_array`)[/+] on Jan 7, 2026
  4. 1 remaining item

  5. alamb commented on Jan 21, 2026

    @alamb
    ContributorAuthor

    All impl From<ArrayData> have been merged. I also double checked that they all now use ArrayData::into_parts so this is now complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions