Skip to content

Commit

Permalink
add ElemField() Field to arrow.ListLikeType
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx committed Jun 6, 2023
1 parent 87d0824 commit 259196d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/arrow/datatype_nested.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type (
ListLikeType interface {
DataType
Elem() DataType
ElemField() Field
}
)

Expand Down Expand Up @@ -401,6 +402,9 @@ func (t *MapType) ValueField() Field { return Field{Name: "entries", Type:
// Elem returns the MapType's element type (if treating MapType as ListLikeType)
func (t *MapType) Elem() DataType { return t.ValueType() }

// ElemField returns the MapType's element field (if treating MapType as ListLikeType)
func (t *MapType) ElemField() Field { return t.ValueField() }

func (t *MapType) SetItemNullable(nullable bool) {
t.value.Elem().(*StructType).fields[1].Nullable = nullable
}
Expand Down

0 comments on commit 259196d

Please sign in to comment.