21.5.1.6605

```sql
create table bftest (k Int64, x Array(Int64), index ix1(x) TYPE bloom_filter GRANULARITY 3) 
Engine=MergeTree order by k;

insert into bftest select number, 
    arrayMap(i->rand64()%565656, range(10)) from numbers(10000000);
insert into bftest select number, 
    arrayMap(i->rand64()%565656, range(10)) from numbers(100000000);

###  hasAny(x, [42,-42])
select count() from bftest where hasAny(x, [42,-42]);
Elapsed: 0.909 sec. Processed 110.00 million rows

### has (x, 42) or has(x, -42)
select count() from bftest where has (x, 42) or has(x, -42);
Elapsed: 0.143 sec. Processed 6.55 million rows

```
{
    
    if (node->as<ASTSubquery>() || node->as<ASTIdentifier>())
        return PreparedSetKey::forSubquery(*node);
    if (const auto * date_type_tuple = typeid_cast<const DataTypeTuple *>(&*data_type))
        return PreparedSetKey::forLiteral(*node, date_type_tuple->getElements());
    return PreparedSetKey::forLiteral(*node, DataTypes(1, data_type));
}
ColumnWithTypeAndName getPreparedSetInfo(const SetPtr & prepared_set)
{
    if (prepared_set->getDataTypes().size() == 1)
        return {prepared_set->getSetElements()[0], prepared_set->getElementsTypes()[0], "dummy"};
    Columns set_elements;
    for (auto & set_element : prepared_set->getSetElements())
        set_elements.emplace_back(set_element->convertToFullColumnIfConst());
    return {ColumnTuple::create(set_elements), std::make_shared<DataTypeTuple>(prepared_set->getElementsTypes()), "dummy"};
}
bool maybeTrueOnBloomFilter(const IColumn * hash_column, const BloomFilterPtr & bloom_filter, size_t hash_functions)