emkornfield commented on a change in pull request #10106:
URL: https://github.com/apache/arrow/pull/10106#discussion_r619878822



##########
File path: go/arrow/datatype_nested.go
##########
@@ -148,6 +148,40 @@ func (t *StructType) FieldByName(name string) (Field, 
bool) {
        return t.fields[i], true
 }
 
+type MapType struct {
+       value      *ListType
+       KeysSorted bool
+}
+
+func MapOf(key, item DataType) *MapType {
+       if key == nil || item == nil {
+               panic("arrow: nil key or item type for MapType")
+       }
+
+       return &MapType{value: ListOf(StructOf(Field{Name: "key", Type: key}, 
Field{Name: "value", Type: item, Nullable: true}))}

Review comment:
       does "key" and "value" hardcoded here have any implications for reading 
maps that name this differentlcy.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to