Update OptimizeIfWithConstantConditionVisitor.cpp

This commit is contained in:
Nikolai Kochetov 2021-11-29 17:31:54 +03:00 committed by GitHub
parent 185c20cf88
commit 7bf7735470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<ASTFunction>())
{
if (isFunctionCast(function))