Remove error message from empty bloomfilter lookups

If a bloomfilter doesn't have a type, that just means no
bloomfilter_add() has been called yet, so seems undesirable to emit an
error for a lookup against something that's known to be empty.
This commit is contained in:
Jon Siwek 2020-04-24 10:15:57 -07:00
parent 6e2cd3ae44
commit f452f26d11
3 changed files with 3 additions and 1 deletions

View file

@ -174,7 +174,7 @@ function bloomfilter_lookup%(bf: opaque of bloomfilter, x: any%): count
const BloomFilterVal* bfv = static_cast<const BloomFilterVal*>(bf);
if ( ! bfv->Type() )
reporter->Error("cannot perform lookup on untyped Bloom filter");
return val_mgr->GetCount(0);
else if ( ! same_type(bfv->Type(), x->Type()) )
reporter->Error("incompatible Bloom filter types");