You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "zeroshade (via GitHub)" <gi...@apache.org> on 2024/10/25 13:53:50 UTC

[PR] fix(parquet): Reading UUID columns [arrow-go]

zeroshade opened a new pull request, #173:
URL: https://github.com/apache/arrow-go/pull/173

   Split from #171 to be a more focused PR.
   
   Currently we will properly write arrow data with the canonical UUID extension type as a parquet UUID column via `pqarrow`. This PR enables us to read back that data using the `extensions.UUID` data type correctly even when we don't have a stored schema.
   
   Added a test to the `ArrowExtensionTypeRoundTrip` to ensure proper round trip without a stored schema.
   
    


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(parquet): Reading UUID columns [arrow-go]

Posted by "kou (via GitHub)" <gi...@apache.org>.
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(parquet): Reading UUID columns [arrow-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade merged PR #173:
URL: https://github.com/apache/arrow-go/pull/173


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org