mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 17:44:23 +00:00
Update OptimizeIfWithConstantConditionVisitor.cpp
This commit is contained in:
parent
185c20cf88
commit
7bf7735470
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user