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

Function IntValue

vector/int.go:47–62  ·  view source on GitHub ↗
(vec Any, slot uint32)

Source from the content-addressed store, hash-verified

45}
46
47func IntValue(vec Any, slot uint32) int64 {
48 switch vec := Under(vec).(type) {
49 case *Int:
50 return vec.Value(slot)
51 case *Const:
52 return IntValue(vec.Any, 0)
53 case *Dict:
54 return IntValue(vec.Any, uint32(vec.Index[slot]))
55 case *Dynamic:
56 tag := vec.Tags[slot]
57 return IntValue(vec.Values[tag], vec.ForwardTagMap()[slot])
58 case *View:
59 return IntValue(vec.Any, vec.Index[slot])
60 }
61 panic(vec)
62}

Callers 15

indexArrayOrSetFunction · 0.92
indexRecordFunction · 0.92
compareEQIntFlatConstFunction · 0.92
compareEQIntDictConstFunction · 0.92
compareEQIntViewConstFunction · 0.92
compareEQIntConstFlatFunction · 0.92
compareEQIntConstDictFunction · 0.92
compareEQIntConstViewFunction · 0.92
compareEQIntConstConstFunction · 0.92
compareNEIntFlatConstFunction · 0.92
compareNEIntDictConstFunction · 0.92
compareNEIntViewConstFunction · 0.92

Calls 3

ForwardTagMapMethod · 0.80
UnderFunction · 0.70
ValueMethod · 0.45

Tested by 1

TestArithOpsAndFormsFunction · 0.74