From 3f5839c83cd3113545e323edcc5771cd1260df2b Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 8 Nov 2020 16:45:57 +0300 Subject: [PATCH] Add one more case --- src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp b/src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp index c709f8c3c99..fa0aa03e820 100644 --- a/src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp +++ b/src/Storages/MergeTree/MergeTreeIndexConditionBloomFilter.cpp @@ -369,6 +369,8 @@ static bool indexOfCanUseBloomFilter(const ASTPtr & parent) Field zero(0); return (function->name == "equals" /// indexOf(...) = c, c != 0 && !applyVisitor(FieldVisitorAccurateEquals(), constant->value, zero)) + || (function->name == "notEquals" /// indexOf(...) != c, c = 0 + && applyVisitor(FieldVisitorAccurateEquals(), constant->value, zero)) || (function->name == (reversed ? "less" : "greater") /// indexOf(...) > c, c >= 0 && !applyVisitor(FieldVisitorAccurateLess(), constant->value, zero)) || (function->name == (reversed ? "lessOrEquals" : "greaterOrEquals") /// indexOf(...) >= c, c > 0