candiduslynx commented on code in PR #35457:
URL: https://github.com/apache/arrow/pull/35457#discussion_r1187605102


##########
go/internal/types/extension_types.go:
##########
@@ -208,37 +199,49 @@ type UUIDType struct {
 // NewUUIDType is a convenience function to create an instance of UuidType
 // with the correct storage type
 func NewUUIDType() *UUIDType {
-       return &UUIDType{
-               ExtensionBase: arrow.ExtensionBase{
-                       Storage: &arrow.FixedSizeBinaryType{ByteWidth: 16}}}
+       return &UUIDType{ExtensionBase: arrow.ExtensionBase{Storage: 
&arrow.FixedSizeBinaryType{ByteWidth: 16}}}
 }
 
-// ArrayType returns TypeOf(UuidArray) for constructing uuid arrays
-func (UUIDType) ArrayType() reflect.Type { return reflect.TypeOf(UUIDArray{}) }
+// ArrayType returns TypeOf(UUIDArray{}) for constructing UUID arrays
+func (*UUIDType) ArrayType() reflect.Type {
+       return reflect.TypeOf(UUIDArray{})
+}
+
+func (*UUIDType) ExtensionName() string {
+       return "uuid"
+}
+
+func (e *UUIDType) String() string {
+       return fmt.Sprintf("extension_type<storage=%s>", e.Storage)
+}
 
-func (UUIDType) ExtensionName() string { return "uuid" }
+func (e *UUIDType) MarshalJSON() ([]byte, error) {
+       return []byte(fmt.Sprintf(`{"name":"%s","metadata":%s}`, 
e.ExtensionName(), e.Serialize())), nil
+}
 
 // Serialize returns "uuid-serialized" for testing proper metadata passing
-func (UUIDType) Serialize() string { return "uuid-serialized" }
+func (*UUIDType) Serialize() string {

Review Comment:
   just for the consistency



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