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 2023/07/02 16:40:08 UTC
[GitHub] [arrow-adbc] zeroshade commented on a diff in pull request #854: fix(go/adbc): fix crash on map type
zeroshade commented on code in PR #854:
URL: https://github.com/apache/arrow-adbc/pull/854#discussion_r1249618908
##########
go/adbc/utils/utils.go:
##########
@@ -30,7 +30,15 @@ func RemoveSchemaMetadata(schema *arrow.Schema) *arrow.Schema {
func removeFieldMetadata(field *arrow.Field) arrow.Field {
fieldType := field.Type
- if nestedType, ok := field.Type.(arrow.NestedType); ok {
+ if ty, ok := field.Type.(*arrow.MapType); ok {
+ // XXX: this can't handle nonstandard field names or
Review Comment:
Is there any particular reason to single out the map type like this instead of doing this in the switch case? The recursive call to `removeFieldMetadata` should handle calling removeFieldMetadata on the child of the list[struct]. We just need to modify the switch case appropriately to create the new map type without the metadata. Personally I think that would be cleaner than this entire separate if case.
Thoughts?
--
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