Skip to content

[C++] Improve FlattenRecursively by making it materialize fewer intermediate array values #41182

@ZhangHuiGui

Description

@ZhangHuiGui

Describe the enhancement requested

Improve FlattenRecursively by making it materialize fewer intermediate array values

This function is used to flatten a multi-level nested logical list Arrays.

There are multiple ways to batch the copying of data of deeply-nested lists without allocating a new Array per level.

For instance, if you are flattening a fixed_size_list<fixed_size_list<int32>, 2>, 3> without bitmaps on the internal arrays of values, you can gather blocks containing 2 * 3 32-bit integers from the innermost values array to a pre-allocated destination ArrayData.

Comes from : #41092 (comment)

Component(s)

C++

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions