zeroshade commented on code in PR #1241:
URL: https://github.com/apache/arrow-go/pull/1241#discussion_r3884108347
##########
parquet/pqarrow/schema.go:
##########
@@ -353,7 +353,7 @@ func fieldToNode(name string, field arrow.Field, props
*parquet.WriterProperties
return schema.MapOf(field.Name, keyNode, valueNode,
repFromNullable(field.Nullable), fieldIDFromMeta(field.Metadata))
case arrow.EXTENSION:
extType := field.Type.(arrow.ExtensionType)
- if extType.ExtensionName() == "parquet.variant" {
+ if extensions.IsVariantExtensionName(extType.ExtensionName()) {
return variantToNode(extType.(*extensions.VariantType),
field, props, arrprops)
Review Comment:
`arrow.GetExtensionType("parquet.variant")` now returns
`*extensions.legacyVariantType`. The new name predicate accepts that type, but
this unconditional assertion to `*extensions.VariantType` panics. `ToParquet`
should return an error for unsupported wrappers or normalize compatible legacy
storage through `NewVariantType`, rather than asserting based only on the
extension name. Please add a regression test using the registry-returned legacy
type.
--
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]