From 7bf7735470d9c03f6bcaaf4b1f67e483b2f247eb Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 29 Nov 2021 17:31:54 +0300 Subject: [PATCH] Update OptimizeIfWithConstantConditionVisitor.cpp --- src/Interpreters/OptimizeIfWithConstantConditionVisitor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Interpreters/OptimizeIfWithConstantConditionVisitor.cpp b/src/Interpreters/OptimizeIfWithConstantConditionVisitor.cpp index 8683fbf002d..0440c52797c 100644 --- a/src/Interpreters/OptimizeIfWithConstantConditionVisitor.cpp +++ b/src/Interpreters/OptimizeIfWithConstantConditionVisitor.cpp @@ -28,6 +28,8 @@ static bool tryExtractConstValueFromCondition(const ASTPtr & condition, bool & v } /// cast of numeric constant in condition to UInt8 + /// Note: this solution is ad-hoc and only implemented for yandex.metrica use case. + /// We should allow any constant condition (or maybe remove this optimization completely) later. if (const auto * function = condition->as()) { if (isFunctionCast(function))