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

Method evalTypeOfType

runtime/sam/expr/dot.go:82–90  ·  view source on GitHub ↗
(b scode.Bytes)

Source from the content-addressed store, hash-verified

80}
81
82func (d *DotExpr) evalTypeOfType(b scode.Bytes) super.Value {
83 typ, _ := d.sctx.DecodeTypeValue(b)
84 if typ, ok := super.TypeUnder(typ).(*super.TypeRecord); ok {
85 if typ, ok := typ.TypeOfField(d.field); ok {
86 return d.sctx.LookupTypeValue(typ)
87 }
88 }
89 return d.sctx.Missing()
90}
91
92// DotExprToString returns text for the Evaluator assuming it's a field expr.
93func DotExprToString(e Evaluator) (string, error) {

Callers 1

EvalMethod · 0.95

Calls 5

TypeUnderFunction · 0.92
DecodeTypeValueMethod · 0.80
TypeOfFieldMethod · 0.80
LookupTypeValueMethod · 0.80
MissingMethod · 0.80

Tested by

no test coverage detected