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

Function ValueAt

vector/any.go:18–32  ·  view source on GitHub ↗

ValueAt returns the value in vec at slot. If b is not nil, ValueAt calls b's Truncate method and builds the value in it. To safely reuse b while the value is live, call b's Reset method or the value's Copy method.

(b *scode.Builder, vec Any, slot uint32)

Source from the content-addressed store, hash-verified

16// Truncate method and builds the value in it. To safely reuse b while the
17// value is live, call b's Reset method or the value's Copy method.
18func ValueAt(b *scode.Builder, vec Any, slot uint32) super.Value {
19 var typ super.Type
20 if d, ok := vec.(*Dynamic); ok {
21 typ = d.TypeOf(slot)
22 } else {
23 typ = vec.Type()
24 }
25 if b == nil {
26 b = scode.NewBuilder()
27 } else {
28 b.Truncate()
29 }
30 vec.Serialize(b, slot)
31 return super.NewValue(typ, b.Bytes().Body())
32}

Callers 14

MaterializeFunction · 0.92
EvalMethod · 0.92
compareComplexMethod · 0.92
CallMethod · 0.92
ConsumeMethod · 0.92
buildTableFunction · 0.92
probeLeftMethod · 0.92
probeRightMethod · 0.92
bodyPullMethod · 0.92
PullMethod · 0.92
updateValMethod · 0.92
vectorConcatMethod · 0.92

Calls 8

NewBuilderFunction · 0.92
NewValueFunction · 0.92
TruncateMethod · 0.80
BodyMethod · 0.80
TypeOfMethod · 0.65
TypeMethod · 0.65
SerializeMethod · 0.65
BytesMethod · 0.45

Tested by

no test coverage detected