rok commented on code in PR #37533:
URL: https://github.com/apache/arrow/pull/37533#discussion_r1435202938


##########
cpp/src/arrow/extension/fixed_shape_tensor.h:
##########
@@ -94,6 +94,15 @@ class ARROW_EXPORT FixedShapeTensorType : public 
ExtensionType {
   /// Create a FixedShapeTensorArray from ArrayData
   std::shared_ptr<Array> MakeArray(std::shared_ptr<ArrayData> data) const 
override;
 
+  /// \brief Create a Tensor from a Scalar value from a FixedShapeTensorArray
+  ///
+  /// This method will return a Tensor from FixedShapeTensorArray with strides
+  /// derived from shape and permutation of FixedShapeTensorType. Shape and
+  /// dim_names will be permuted according to permutation stored in the
+  /// FixedShapeTensorType metadata.
+  const Result<std::shared_ptr<Tensor>> GetTensor(
+      const std::shared_ptr<ExtensionScalar>& scalar) const;

Review Comment:
   Oh, nice. 
https://github.com/apache/arrow/pull/37533/commits/dd01fc0ef24dcfcd16a692f01468a27f8fa920f7



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to