zeroshade commented on a change in pull request #11359:
URL: https://github.com/apache/arrow/pull/11359#discussion_r741436599
##########
File path: go/arrow/array/struct.go
##########
@@ -105,6 +107,36 @@ func (a *Struct) setData(data *Data) {
}
}
+func (a *Struct) getOneForMarshal(i int) interface{} {
+ if a.IsNull(i) {
+ return nil
+ }
+
+ tmp := make(map[string]interface{})
+ fieldList := a.data.dtype.(*arrow.StructType).Fields()
+ for j, d := range a.fields {
+ tmp[fieldList[j].Name] = d.getOneForMarshal(i)
Review comment:
currently the Go implementation does not support duplicate field names
in structs, only in schemas. So at least for now i'm guaranteed that there will
be no duplicate field names until i make a change to support them in the struct
type in general.
--
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]