rok commented on code in PR #37298:
URL: https://github.com/apache/arrow/pull/37298#discussion_r1726888736
##########
python/pyarrow/types.pxi:
##########
@@ -1765,6 +1765,38 @@ cdef class ExtensionType(BaseExtensionType):
return ExtensionScalar
+cdef class UuidType(BaseExtensionType):
+ """
+ Concrete class for UUID extension type.
+ """
+
+ cdef void init(self, const shared_ptr[CDataType]& type) except *:
+ BaseExtensionType.init(self, type)
+ self.uuid_ext_type = <const CUuidType*> type.get()
+
+ def __arrow_ext_serialize__(self):
+ """
+ Serialized representation of metadata to reconstruct the type object.
+ """
+ return self.uuid_ext_type.Serialize()
+
+ @classmethod
+ def __arrow_ext_deserialize__(self, storage_type, serialized):
+ """
+ Return an UuidType instance from the storage type.
+ """
+ return self.uuid_ext_type.Deserialize(storage_type, serialized)
Review Comment:
It's probably not. Removed.
##########
python/pyarrow/includes/libarrow.pxd:
##########
@@ -2865,6 +2865,19 @@ cdef extern from "arrow/extension_type.h" namespace
"arrow":
shared_ptr[CArray] storage()
+cdef extern from "arrow/extension/uuid.h" namespace "arrow::extension":
+ cdef cppclass CUuidType" arrow::extension::UuidType"(CExtensionType):
+
+ @staticmethod
+ CResult[shared_ptr[CDataType]] Make()
+
+ CResult[shared_ptr[CDataType]] Deserialize(const c_string&
serialized_data) const
+
+ c_string Serialize() const
+
+ const shared_ptr[CDataType] value_type()
Review Comment:
Removed.
--
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]