zeroshade commented on a change in pull request #10106:
URL: https://github.com/apache/arrow/pull/10106#discussion_r619890704
##########
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:
I'll double check but I don't believe I enforce these names having to be
named this way during reading. That said, naming them this way is how the spec
describes it should be done.
--
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]