diff --git a/src/OpaqueVal.cc b/src/OpaqueVal.cc index 3886c61401..71f876e073 100644 --- a/src/OpaqueVal.cc +++ b/src/OpaqueVal.cc @@ -722,14 +722,6 @@ BloomFilterValPtr BloomFilterVal::Intersect(const BloomFilterVal* x, const Bloom return nullptr; } - auto final_type = x->Type() ? x->Type() : y->Type(); - - if ( typeid(*x->bloom_filter) != typeid(*y->bloom_filter) ) - { - reporter->Error("cannot merge different Bloom filter types"); - return nullptr; - } - if ( typeid(*x->bloom_filter) != typeid(*y->bloom_filter) ) { reporter->Error("cannot intersect different Bloom filter types"); @@ -744,6 +736,8 @@ BloomFilterValPtr BloomFilterVal::Intersect(const BloomFilterVal* x, const Bloom return nullptr; } + auto final_type = x->Type() ? x->Type() : y->Type(); + auto intersected = make_intrusive(intersected_bf); if ( final_type && ! intersected->Typify(final_type) ) diff --git a/src/probabilistic/bloom-filter.bif b/src/probabilistic/bloom-filter.bif index bed51c3ac7..aa83d30600 100644 --- a/src/probabilistic/bloom-filter.bif +++ b/src/probabilistic/bloom-filter.bif @@ -160,7 +160,7 @@ function bloomfilter_add%(bf: opaque of bloomfilter, x: any%): any ## Decrements the counter for an element that was added to a counting bloom filter in the past. ## -## Note that decrement operations can use to false negatives if used on a counting bloom-filter +## Note that decrement operations can lead to false negatives if used on a counting bloom-filter ## that exceeded the width of its counter. ## ## bf: The coubting bloom filter handle.