You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromuuidimportuuid4importpyarrowaspaclassUuidType(pa.ExtensionType):
def__init__(self):
pa.ExtensionType.__init__(self, pa.binary(16), "my_package.uuid")
def__arrow_ext_serialize__(self):
# since we don't have a parameterized type, we don't need extra# metadata to be deserializedreturnb''@classmethoddef__arrow_ext_deserialize__(self, storage_type, serialized):
# return an instance of this subclass given the serialized# metadata.returnUuidType()
defmain():
data= [uuid4().bytes]
arr=pa.array(data, type=UuidType())
print(arr)
if__name__=="__main__":
main()
Describe the enhancement requested
As noted in #44070 (comment) - it would be nice if we could shorten:
to:
Component(s)
Python
The text was updated successfully, but these errors were encountered: