mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
return early rather than just evaluating a rejection
The intent of these lines was "if there's no filter, return immediately rather than doing operations". But actually we didn't write that, so we were calling intersectionCallback on empty filters, which didn't matter since it failed out quickly, but it's still a waste of effort. Except we shouldn't get to these anyway because ConsiderKey already correctly rejected these cases. I think. But still.
This commit is contained in:
parent
16fef7ffbd
commit
6e90bfc9bc
1 changed files with 2 additions and 2 deletions
|
|
@ -625,7 +625,7 @@ func (b *BitmapBitmapFilter) ConsiderData(key FilterKey, data *Container) Filter
|
|||
base := uint64(key << 16)
|
||||
filter := b.containers[pos]
|
||||
if filter == nil {
|
||||
key.RejectUntilOffset(b.nextOffsets[pos])
|
||||
return key.RejectUntilOffset(b.nextOffsets[pos])
|
||||
}
|
||||
var lastErr error
|
||||
matched := false
|
||||
|
|
@ -1040,7 +1040,7 @@ func (b *BitmapBSICountFilter) ConsiderData(key FilterKey, data *Container) Filt
|
|||
pos := key & keyMask
|
||||
filter := b.containers[pos]
|
||||
if filter == nil {
|
||||
key.RejectUntilOffset(b.nextOffsets[pos])
|
||||
return key.RejectUntilOffset(b.nextOffsets[pos])
|
||||
}
|
||||
row := uint64(key >> rowExponent) // row count within the fragment
|
||||
// How do we translate the filter and existence bit into actionable things?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue