thisisnic commented on code in PR #46675:
URL: https://github.com/apache/arrow/pull/46675#discussion_r2153237201
##########
cpp/src/arrow/array/util.cc:
##########
@@ -829,7 +829,17 @@ class RepeatedArrayFactory {
}
Status Visit(const ExtensionType& type) {
- return Status::NotImplemented("construction from scalar of type ",
*scalar_.type);
+ // Retrieve the underlying storage scalar from the ExtensionScalar
+ const auto& ext_scalar = checked_cast<const ExtensionScalar&>(scalar_);
+ const auto& storage_scalar = ext_scalar.value;
+
+ // Create an array from the storage scalar
+ ARROW_ASSIGN_OR_RAISE(auto storage_array,
+ MakeArrayFromScalar(*storage_scalar, length_,
pool_));
Review Comment:
Thanks! I was going to do it but needed to do some swapping around of things
that means I think I now need the `ext_scalar` object.
--
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]