lidavidm commented on a change in pull request #10294:
URL: https://github.com/apache/arrow/pull/10294#discussion_r630977680
##########
File path: cpp/src/arrow/record_batch.h
##########
@@ -108,7 +108,7 @@ class ARROW_EXPORT RecordBatch {
virtual std::shared_ptr<ArrayData> column_data(int i) const = 0;
/// \brief Retrieve all arrays' internal data from the record batch.
- virtual ArrayDataVector column_data() const = 0;
+ virtual const ArrayDataVector& column_data() const = 0;
Review comment:
We would have to make it virtual and push it down into SimpleRecordBatch
(which is ok because right now it makes O(cols) virtual calls internally
anyways). That said, from a quick grep, I don't think the method is ever used.
Table::columns has a few uses so maybe that's worth targeting. And it's
probably better to be consistent where possible.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]