[
https://issues.apache.org/jira/browse/ARROW-7051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17478736#comment-17478736
]
Jeroen van Straten commented on ARROW-7051:
-------------------------------------------
Okay, this took far longer than it should have. I thought I had more test
failures, but I guess those must have been unrelated, or I'm misremembering. In
the end, the only problem seems to be that {{TrivialScalarUnaryAsArraysExec()}}
[allocates an output buffer with
{{MakeArrayFromScalar()}}|https://github.com/apache/arrow/blob/fd580db7573f56ef57bfa8ba97caa67e69a79ef6/cpp/src/arrow/compute/kernels/util_internal.cc#L73],
and {{MakeArrayFromScalar()}} [uses {{MakeArrayOfNull()}} for a special
case|https://github.com/apache/arrow/blob/fd580db7573f56ef57bfa8ba97caa67e69a79ef6/cpp/src/arrow/array/util.cc#L790].
At least, the test suite now passes for me locally.
> [C++] Improve MakeArrayOfNull to support creation of multiple arrays
> --------------------------------------------------------------------
>
> Key: ARROW-7051
> URL: https://issues.apache.org/jira/browse/ARROW-7051
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Affects Versions: 0.14.0
> Reporter: Ben Kietzman
> Assignee: Jeroen van Straten
> Priority: Minor
> Labels: beginner, good-first-issue, pull-request-available
> Time Spent: 2h
> Remaining Estimate: 0h
>
> MakeArrayOfNull reuses a single buffer of {{0}} for all buffers in the array
> it creates. It could be extended to reuse that same buffer for all buffers in
> multiple arrays. This optimization will make RecordBatchProjector and
> ConcatenateTablesWithPromotion more memory efficient
--
This message was sent by Atlassian Jira
(v8.20.1#820001)