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


##########
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:
   yea, I agree. We shouldn't error in this case, just let it pass through and 
maintain the metadata for the field



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