AlenkaF commented on issue #32284:
URL: https://github.com/apache/arrow/issues/32284#issuecomment-4428246325

   Unfortunately this is a very old issue that can be closed.
   `PyExtensionType` class has been removed in 
https://github.com/apache/arrow/issues/46198.
   
   A working example with the `ExtensionType` is as follows:
   
   ```python
   In [1]: import pyarrow as pa
   
   In [2]: class ExampleUuidType(pa.ExtensionType):
      ...: 
      ...:     def __init__(self):
      ...:         super().__init__(pa.binary(16), 
'pyarrow.tests.ExampleUuidType')
      ...: 
      ...:     def __reduce__(self):
      ...:         return ExampleUuidType, ()
      ...: 
      ...:     def __arrow_ext_serialize__(self):
      ...:         return b''
      ...: 
      ...:     @classmethod
      ...:     def __arrow_ext_deserialize__(cls, storage_type, serialized):
      ...:         return cls()
      ...: 
   
   In [3]: ty = ExampleUuidType()
   
   In [4]: ty.bit_width
   Out[4]: 128
   ```


-- 
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]

Reply via email to