Tobias Zagorni created ARROW-16280:
--------------------------------------
Summary: [C++] Avoid copying shared_ptr in Expression::type()
Key: ARROW-16280
URL: https://issues.apache.org/jira/browse/ARROW-16280
Project: Apache Arrow
Issue Type: Sub-task
Components: C++
Reporter: Tobias Zagorni
Assignee: Tobias Zagorni
Split off from ARROW-16161, since this is a fairly straightforward fix and
completely independent of ExecBatch.
Expression::type() currently copies a shared_ptr<DataType>, while the return
value is often used directly. We can avoid copying the shared_ptr, by returning
a reference to it. This reduces thread contention on these shared_ptrs
(ARROW-16161).
--
This message was sent by Atlassian Jira
(v8.20.7#820007)