Richard Tia created ARROW-16967:
-----------------------------------

             Summary: [Python] Subclassing the PyExtensionType and getting it's 
bit_width attribute returns Non-fixed width type ValueError
                 Key: ARROW-16967
                 URL: https://issues.apache.org/jira/browse/ARROW-16967
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
         Environment: pyarrow 9.0.0dev
python 3.9
            Reporter: Richard Tia


Subclassing the PyExtensionType and getting it's bit_width attribute returns 
Non-fixed width type ValueError

 

[https://arrow.apache.org/docs/python/extending_types.html#defining-extension-types-user-defined-types]

>From example in above link:
{code:java}
import pyarrow as pa

class UuidType(pa.PyExtensionType):

    def __init__(self):
        pa.PyExtensionType.__init__(self, pa.binary(16))

    def __reduce__(self):
        return UuidType, () 

uuid_type = UuidType()
print(uuid_type.bit_width)

{code}
Error:
{code:java}
E   ValueError: Non-fixed width type
pyarrow/types.pxi:157: ValueError {code}
 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to