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

Function indexArrayOrSet

runtime/sam/expr/eval.go:733–739  ·  view source on GitHub ↗
(sctx *super.Context, inner super.Type, vector scode.Bytes, idx int)

Source from the content-addressed store, hash-verified

731}
732
733func indexArrayOrSet(sctx *super.Context, inner super.Type, vector scode.Bytes, idx int) super.Value {
734 bytes, idx := getNthFromContainer(vector, idx)
735 if idx < 0 {
736 return sctx.Missing()
737 }
738 return deunion(inner, bytes)
739}
740
741func indexRecordByIndex(sctx *super.Context, typ *super.TypeRecord, record scode.Bytes, idx int) super.Value {
742 bytes, idx := getNthFromRecord(typ, record, idx)

Callers 1

EvalMethod · 0.70

Calls 3

getNthFromContainerFunction · 0.85
MissingMethod · 0.80
deunionFunction · 0.70

Tested by

no test coverage detected