diff --git a/dbms/src/Interpreters/BloomFilter.cpp b/dbms/src/Interpreters/BloomFilter.cpp index 62897b6c774..150ddbb5e0c 100644 --- a/dbms/src/Interpreters/BloomFilter.cpp +++ b/dbms/src/Interpreters/BloomFilter.cpp @@ -92,7 +92,12 @@ bool BloomFilter::findHashWithSeed(const UInt64 & hash, const UInt64 & hash_seed const DataTypePtr getPrimitiveType(const DataTypePtr data_type) { if (const auto * array_type = typeid_cast(data_type.get())) - return getPrimitiveType(array_type->getNestedType()); + { + if (!typeid_cast(array_type->getNestedType().get())) + return getPrimitiveType(array_type->getNestedType()); + else + throw Exception("Unexpected type " + data_type->getName() + " of bloom filter index.", ErrorCodes::LOGICAL_ERROR); + } if (const auto * nullable_type = typeid_cast(data_type.get())) return getPrimitiveType(nullable_type->getNestedType());