milesgranger commented on code in PR #14238:
URL: https://github.com/apache/arrow/pull/14238#discussion_r992271171
##########
python/pyarrow/tests/test_extension_type.py:
##########
@@ -60,6 +60,22 @@ def __reduce__(self):
return UuidType, ()
+class LabelType(pa.ExtensionType):
+
+ def __init__(self):
+ super(LabelType, self).__init__(pa.string(), "label")
+
+ def __reduce__(self):
+ return LabelType, ()
+
+ def __arrow_ext_serialize__(self):
+ return b""
+
+ @classmethod
+ def __arrow_ext_deserialize__(cls, storage_type, serialized):
+ return LabelType()
Review Comment:
Aha, docs ftw. :) Thank you.
--
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]