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

Method makeHitsResult

runtime/vam/op/nestedloopjoin.go:172–190  ·  view source on GitHub ↗
(vec vector.Any, hits *roaring.Bitmap)

Source from the content-addressed store, hash-verified

170}
171
172func (n *nestedLoopJoin) makeHitsResult(vec vector.Any, hits *roaring.Bitmap) (vector.Any, bool) {
173 vecLen := uint64(vec.Len())
174 if hits.GetCardinality() == vecLen {
175 // No misses.
176 return nil, false
177 }
178 hits.Flip(0, vecLen)
179 missVec := vector.Pick(vec, hits.ToArray())
180 fieldName := n.leftAlias
181 if n.style == "right" {
182 fieldName = n.rightAlias
183 }
184 return vector.Apply(false, func(vecs ...vector.Any) vector.Any {
185 typ := n.rctx.Sctx.MustLookupTypeRecord([]super.Field{
186 super.NewField(fieldName, vecs[0].Type()),
187 })
188 return vector.NewRecord(typ, vecs, vecs[0].Len())
189 }, missVec), true
190}

Callers 1

joinMethod · 0.95

Calls 7

PickFunction · 0.92
ApplyFunction · 0.92
NewFieldFunction · 0.92
NewRecordFunction · 0.92
MustLookupTypeRecordMethod · 0.80
LenMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected