MCPcopy Create free account
hub / github.com/brimdata/super / InnerType

Function InnerType

type.go:335–344  ·  view source on GitHub ↗

Utilities shared by complex types (ie, set and array) InnerType returns the element type for the underlying set or array type or nil if the underlying type is not a set or array.

(typ Type)

Source from the content-addressed store, hash-verified

333// InnerType returns the element type for the underlying set or array type or
334// nil if the underlying type is not a set or array.
335func InnerType(typ Type) Type {
336 switch typ := TypeUnder(typ).(type) {
337 case *TypeSet:
338 return typ.Type
339 case *TypeArray:
340 return typ.Type
341 default:
342 return nil
343 }
344}
345
346func IsUnionType(typ Type) bool {
347 _, ok := TypeUnder(typ).(*TypeUnion)

Callers 15

newArraySetBuilderFunction · 0.92
decodeStringsFunction · 0.92
arrayToExprFunction · 0.92
setToExprFunction · 0.92
flattenMethod · 0.92
compareValuesFunction · 0.92
EvalMethod · 0.92
EvalMethod · 0.92
EvalMethod · 0.92
toArrayOrSetMethod · 0.92
hasErrorMethod · 0.92
unnestArrayOrSetFunction · 0.92

Calls 1

TypeUnderFunction · 0.85

Tested by

no test coverage detected