mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Refactor
This commit is contained in:
parent
d96bde179d
commit
a2bb87771d
1 changed files with 8 additions and 6 deletions
|
|
@ -601,12 +601,14 @@ func (b *Bitmap) unionIntoTarget(target *Bitmap, others ...*Bitmap) {
|
|||
continue
|
||||
}
|
||||
|
||||
iKey, iContainer := iIter.iter.Value()
|
||||
|
||||
// Summary statistics about all the containers in the other bitmaps
|
||||
// that share the same key so we can make smarter union strategy
|
||||
// decisions later.
|
||||
summaryStats := otherIters[i:].calculateSummaryStats(iKey)
|
||||
var (
|
||||
iKey, iContainer = iIter.iter.Value()
|
||||
// Summary statistics about all the containers in the other bitmaps
|
||||
// that share the same key so we can make smarter union strategy
|
||||
// decisions later. Note that we slice to [i:] not [i+1:] because we
|
||||
// want to include the current containers information in the stats.
|
||||
summaryStats = otherIters[i:].calculateSummaryStats(iKey)
|
||||
)
|
||||
|
||||
if summaryStats.isOnlyContainerWithKey {
|
||||
// TODO(rartoul): We can avoid these clones if we can determine
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue