mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 18:32:29 +00:00
Check children first
This commit is contained in:
parent
09a392772d
commit
5b94f9b411
@ -469,18 +469,18 @@ static bool canEvaluateSubtree(const ActionsDAG::Node * node, const Block & allo
|
||||
|
||||
static bool isDeterministicInScopeOfQuery(const ActionsDAG::Node * node)
|
||||
{
|
||||
if (node->type != ActionsDAG::ActionType::FUNCTION)
|
||||
return true;
|
||||
|
||||
if (!node->function_base->isDeterministicInScopeOfQuery())
|
||||
return false;
|
||||
|
||||
for (const auto * child : node->children)
|
||||
{
|
||||
if (!isDeterministicInScopeOfQuery(child))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (node->type != ActionsDAG::ActionType::FUNCTION)
|
||||
return true;
|
||||
|
||||
if (!node->function_base->isDeterministicInScopeOfQuery())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user