rok commented on code in PR #37533:
URL: https://github.com/apache/arrow/pull/37533#discussion_r1424713897
##########
cpp/src/arrow/extension/fixed_shape_tensor.cc:
##########
@@ -203,6 +215,40 @@ std::shared_ptr<Array> FixedShapeTensorType::MakeArray(
return std::make_shared<ExtensionArray>(data);
}
+const Result<std::shared_ptr<Tensor>> FixedShapeTensorType::GetTensor(
+ const std::shared_ptr<ExtensionScalar>& scalar) const {
+ const auto array =
+ internal::checked_pointer_cast<const
FixedSizeListScalar>(scalar->value)->value;
+ const auto value_type =
+ internal::checked_pointer_cast<FixedWidthType>(this->value_type());
Review Comment:
Added checks and tests.
--
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]