jorisvandenbossche commented on issue #39094: URL: https://github.com/apache/arrow/issues/39094#issuecomment-1845614035
Quickly looking into this, but now I am unsure whether it's actually an easy change as I mentioned at https://github.com/apache/arrow/pull/35933#issuecomment-1841288493 to use `self.ext_type.Deserialize(..)`. To be able to call the C++ `Deserialize` method, we first need to instantiate the relevant C++ ExtensionType in the cython unpickle method. But how do you do that? When you have a python instance, you can get that with `self.ext_type`. But when unpickling, you don't have an instance of the specific extension type class yet, because that's exactly what you are unpickling. For pyarrow.ExtensionType, `__arrow_ext_deserialize__` is also a classmethod (i.e. doesn't require an instance), but the implementation here is in python and custom done by the user and can call the class constructor of itself as it sees fit. However, if we want to put similar generic logic on the BaseExtensionType class, there is no `__init__` that we can call. But maybe I am overlooking something cc @pitrou -- 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]
