sjperkins opened a new issue, #36446: URL: https://github.com/apache/arrow/issues/36446
### Describe the bug, including details regarding any error messages, version, and platform. In `cpp/src/arrow/array/concatenate.cc` , the `const ArrayDataVector & in` argument is referenced after being moved into the `in_` within the member initializer list: https://github.com/apache/arrow/blob/7ebc88c8fae62ed97bc30865c845c8061132af7e/cpp/src/arrow/array/concatenate.cc#L172-L191 where `using ArrayDataVector = std::vector<std::shared_ptr<ArrayData>>;` in `type_fwd.h`. I was surprised the code works and that this seems to result in a copy of `in` to `in_` . But I suspect that either 1. The signature should be `ConcatenateImpl(ArrayDataVector in, MemoryPool* pool)` and `in` should not be re-used after the move, or: 2. The member initializer list should be : `in_(in), pool_(pool), out_(std::make_shared<ArrayData>())` ### Component(s) C++ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
