zeroshade commented on code in PR #34631:
URL: https://github.com/apache/arrow/pull/34631#discussion_r1164420192
##########
go/internal/types/extension_types.go:
##########
@@ -209,13 +209,13 @@ func (UUIDType) ExtensionName() string { return "uuid" }
func (UUIDType) Serialize() string { return "uuid-serialized" }
// Deserialize expects storageType to be FixedSizeBinaryType{ByteWidth: 16}
and the data to be
-// "uuid-serialized" in order to correctly create a UuidType for testing
deserialize.
+// "uuid-serialized" in order to correctly create a UUIDType for testing
deserialize.
func (UUIDType) Deserialize(storageType arrow.DataType, data string)
(arrow.ExtensionType, error) {
if string(data) != "uuid-serialized" {
return nil, fmt.Errorf("type identifier did not match: '%s'",
string(data))
}
- if !arrow.TypeEqual(storageType, &arrow.FixedSizeBinaryType{ByteWidth:
16}) {
- return nil, fmt.Errorf("invalid storage type for UuidType: %s",
storageType.Name())
+ if !storageTypeEqual(storageType, &arrow.FixedSizeBinaryType{ByteWidth:
16}) {
Review Comment:
I'm still a little confused here, what's the situation (or string of events)
where Deserialize is being called on something that *is already* an extension
type? Shouldn't `Deserialize` only get called if the type isn't yet an
extension type and we have metadata saying it should be?
--
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]