[
https://issues.apache.org/jira/browse/ARROW-10051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Apache Arrow JIRA Bot reassigned ARROW-10051:
---------------------------------------------
Assignee: Apache Arrow JIRA Bot (was: Yibo Cai)
> [C++][Compute] Make aggregate kernel merge state mutable
> --------------------------------------------------------
>
> Key: ARROW-10051
> URL: https://issues.apache.org/jira/browse/ARROW-10051
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Yibo Cai
> Assignee: Apache Arrow JIRA Bot
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Aggregate kernel _consumes_ each batch and output a _state_, which is then
> _merged_ with other batches. Currently, _state_ parameter is defined as
> _const KernelState&_ in merge interface. It may cause unnecessary data
> copying for kernels with non-trivial states.
> E.g., mode kernel maintains a value:count map in its _state_ structure, it's
> better to move the map than copy it (for merge operation of the first batch).
> Aggregate kernel code template is at [1]. _batch_state_ is an auto
> variable(line 873), modifying it in kernel->merge() is okay (line 888).
> [1]
> https://github.com/apache/arrow/blob/a17717fa528bb7d495cfba5c6b5fb67866934a63/cpp/src/arrow/compute/exec.cc#L871-L891
--
This message was sent by Atlassian Jira
(v8.3.4#803005)