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

Function BoolMask

runtime/vam/expr/conditional.go:74–86  ·  view source on GitHub ↗
(mask vector.Any)

Source from the content-addressed store, hash-verified

72}
73
74func BoolMask(mask vector.Any) (*roaring.Bitmap, *roaring.Bitmap) {
75 bools := roaring.New()
76 other := roaring.New()
77 if dynamic, ok := mask.(*vector.Dynamic); ok {
78 reverse := dynamic.ReverseTagMap()
79 for i, val := range dynamic.Values {
80 boolMaskRidx(reverse[i], bools, other, val)
81 }
82 } else {
83 boolMaskRidx(nil, bools, other, mask)
84 }
85 return bools, other
86}
87
88func boolMaskRidx(ridx []uint32, bools, other *roaring.Bitmap, vec vector.Any) {
89 switch vec := vec.(type) {

Callers 5

applyMaskFunction · 0.92
joinMethod · 0.92
forwardMethod · 0.92
applyMethod · 0.85
dequietMethod · 0.85

Calls 3

boolMaskRidxFunction · 0.85
NewMethod · 0.80
ReverseTagMapMethod · 0.80

Tested by

no test coverage detected