rok commented on code in PR #13594:
URL: https://github.com/apache/arrow/pull/13594#discussion_r920331188
##########
python/pyarrow/array.pxi:
##########
@@ -2771,6 +2771,11 @@ cdef class ExtensionArray(Array):
"""
return self.storage.to_numpy(**kwargs)
+ cdef getitem(self, int64_t i):
+ scalar = ExtensionScalar.wrap(GetResultValue(self.ap.GetScalar(i)))
+ return self.type.__arrow_ext_scalar_class__().from_storage(
+ self.type, scalar.value)
Review Comment:
@jorisvandenbossche Does this approach make sense or should we unwrap the
value and wrap it into the correct subclassed ExtensionScalar? I'm sorry, I'm
not very familiar with the machinery here.
--
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]