kou commented on code in PR #173:
URL: https://github.com/apache/arrow-go/pull/173#discussion_r1817773757
##########
parquet/pqarrow/schema.go:
##########
@@ -984,13 +990,15 @@ func applyOriginalStorageMetadata(origin arrow.Field,
inferred *SchemaField) (mo
return
}
- if !arrow.TypeEqual(extType.StorageType(), inferred.Field.Type)
{
- return modified, fmt.Errorf("%w: mismatch storage type
'%s' for extension type '%s'",
- arrow.ErrInvalid, inferred.Field.Type, extType)
- }
+ if modified && !arrow.TypeEqual(extType, inferred.Field.Type) {
+ if !arrow.TypeEqual(extType.StorageType(),
inferred.Field.Type) {
+ return modified, fmt.Errorf("%w: mismatch
storage type '%s' for extension type '%s'",
+ arrow.ErrInvalid, inferred.Field.Type,
extType)
+ }
- inferred.Field.Type = extType
- modified = true
+ inferred.Field.Type = extType
+ modified = true
Review Comment:
It seems that this is needless.
```suggestion
```
--
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]