disq commented on code in PR #34631:
URL: https://github.com/apache/arrow/pull/34631#discussion_r1160109946


##########
go/parquet/pqarrow/schema.go:
##########
@@ -1043,6 +1066,26 @@ func applyOriginalStorageMetadata(origin arrow.Field, 
inferred *SchemaField) (mo
                                final[k] = inferred.Field.Metadata.Values()[idx]
                        }
                        inferred.Field.Metadata = arrow.MetadataFrom(final)
+
+                       if extName, ok := final[ipc.ExtensionTypeKeyName]; ok {
+                               if extMeta, ok := 
final[ipc.ExtensionMetadataKeyName]; ok {
+                                       ext := arrow.GetExtensionType(extName)
+                                       if ext != nil {
+                                               dd, err2 := 
ext.Deserialize(inferred.Field.Type, extMeta)
+                                               if err2 != nil {
+                                                       err = err2
+                                                       return
+                                               }
+                                               inferred.Field.Type = dd
+                                       } else {
+                                               // We'll be here if the 
extension isn't registered.
+                                               // Optional? maybe skip this 
error and leave the type as is?

Review Comment:
   @zeroshade This needs weighing-in. We could skip the error and leave the 
non-registered extension as the underlying storage type (e.g. if UUID is not 
registered, it silently becomes a FixedArray) which would be better for 
[interop](https://arrow.apache.org/docs/format/Columnar.html#extension-types) 
(the paragraph after the first Note)



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