Skip to content

Commit cf08067

Browse files
Simplify code
1 parent 307015b commit cf08067

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/Analyzer/Passes/AnyFunctionPass.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,19 @@ class AnyFunctionVisitor : public InDepthQueryTreeVisitorWithContext<AnyFunction
2424
if (argument->as<LambdaNode>())
2525
return false;
2626

27-
/// Function arrayJoin is special and should be skipped (think about it as a
28-
/// an aggregate function), otherwise wrong result will be produced.
29-
/// For example:
30-
/// SELECT *, any(arrayJoin([[], []])) FROM numbers(1) GROUP BY number
31-
/// ┌─number─┬─arrayJoin(array(array(), array()))─┐
32-
/// │ 0 │ [] │
33-
/// │ 0 │ [] │
34-
/// └────────┴────────────────────────────────────┘
3527
if (const auto * inside_function = argument->as<FunctionNode>())
28+
{
29+
/// Function arrayJoin is special and should be skipped (think about it as
30+
/// an aggregate function), otherwise wrong result will be produced.
31+
/// For example:
32+
/// SELECT *, any(arrayJoin([[], []])) FROM numbers(1) GROUP BY number
33+
/// ┌─number─┬─arrayJoin(array(array(), array()))─┐
34+
/// │ 0 │ [] │
35+
/// │ 0 │ [] │
36+
/// └────────┴────────────────────────────────────┘
3637
if (inside_function->getFunctionName() == "arrayJoin")
3738
return false;
3839

39-
if (const auto * inside_function = argument->as<FunctionNode>())
40-
{
4140
if (!canRewrite(inside_function))
4241
return false;
4342
}

0 commit comments

Comments
 (0)