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

Method addOrUpdateNone

runtime/vam/expr/recordexpr.go:104–113  ·  view source on GitHub ↗
(name string, typ super.Type, length uint32)

Source from the content-addressed store, hash-verified

102}
103
104func (r *recordExpr) addOrUpdateNone(name string, typ super.Type, length uint32) {
105 if i, ok := r.fieldIndexes[name]; ok {
106 r.fields[i].Type = typ
107 r.fieldVecs[i] = vector.NewNone(r.sctx, typ, length)
108 return
109 }
110 r.fieldIndexes[name] = len(r.fields)
111 r.fields = append(r.fields, super.NewFieldWithOpt(name, typ, true))
112 r.fieldVecs = append(r.fieldVecs, vector.NewNone(r.sctx, typ, length))
113}
114
115func (r *recordExpr) spread(vec vector.Any) {
116 // Ignore non-record values.

Callers 1

evalMethod · 0.95

Calls 2

NewNoneFunction · 0.92
NewFieldWithOptFunction · 0.92

Tested by

no test coverage detected