Add one more case

This commit is contained in:
Alexey Milovidov 2020-11-08 16:45:57 +03:00
parent 8e1a2fc9e4
commit 3f5839c83c

View File

@ -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