Skip to content

[C++] Optimize ArrayBuilder::AppendScalar #28887

@asfimport

Description

@asfimport

Hmm, it looks like the implementation could be more optimized. When appending multiple scalars (or multiple times the same scalars), the required space could be reserved. Also, at least for primitive types, I would expect appending multiple scalars to be much more streamlined than this.

(it looks like such optimizations could be crafted more easily if AppendScalar was a bunch of virtual methods?)

From #10579 (comment)

Also, dictionary scalars aren't supported. You could imagine both appending a dictionary scalar to a regular builder (decoding the value) and appending a dictionary or regular scalar to a dictionary builder (encoding the value as necessary).

Reporter: David Li / @lidavidm

Related issues:

Note: This issue was originally created as ARROW-13197. Please see the migration documentation for further details.

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