AlenkaF commented on code in PR #40064:
URL: https://github.com/apache/arrow/pull/40064#discussion_r1489541391
##########
cpp/src/arrow/record_batch.h:
##########
@@ -80,6 +80,13 @@ class ARROW_EXPORT RecordBatch {
/// in the resulting struct array.
Result<std::shared_ptr<StructArray>> ToStructArray() const;
+ /// \brief Convert record batch with one data type to Tensor
+ ///
+ /// Create a Tensor object with shape (number of rows, number of columns) and
+ /// strides (type size in bytes, type size in bytes * number of rows).
+ /// Generated Tensor will have column-major layout.
+ Result<std::shared_ptr<Tensor>> ToTensor() const;
Review Comment:
Added it here:
https://github.com/apache/arrow/pull/40064/commits/6a2c5bc850d171621e34bee09c5c53dd24d4df9b
Not sure how to test it though =)
--
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]