**Describe the bug**
```
milovidov-desktop :) SET allow_experimental_analyzer = 1

SET allow_experimental_analyzer = 1

Query id: b4494b8c-9f14-4d46-8db9-2cb992dcfcb6

Ok.

0 rows in set. Elapsed: 0.001 sec. 

milovidov-desktop :) SELECT arrayFilter(x -> notEmpty(concat(x)), [NULL, NULL]) FROM system.one ARRAY JOIN [1048577] AS elem, arrayMap(x -> concat(x, elem, ''), ['']) AS unused

SELECT arrayFilter(x -> notEmpty(concat(x)), [NULL, NULL])
FROM system.one
ARRAY JOIN
    [1048577] AS elem,
    arrayMap(x -> concat(x, elem, ''), ['']) AS unused

Query id: ca118c75-812b-4c83-bd30-1af64ed38635


0 rows in set. Elapsed: 0.003 sec. 

Received exception from server (version 22.13.1):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Cannot capture column 3 because it has incompatible type: got Array(UInt32), but UInt32 is expected.. (LOGICAL_ERROR)
```
auto table_function_storage = table_function_ptr->execute(table_function_ast, scope_context, table_function_ptr->getName());
            table_function_node.resolve(std::move(table_function_ptr), std::move(table_function_storage), scope_context);
            break;
        }
        case QueryTreeNodeType::TABLE:
        {
            break;
        }
        case QueryTreeNodeType::ARRAY_JOIN:
        {
            auto & array_join_node = join_tree_node->as<ArrayJoinNode &>();
            resolveQueryJoinTreeNode(array_join_node.getTableExpression(), scope, expressions_visitor);
            validateJoinTableExpressionWithoutAlias(join_tree_node, array_join_node.getTableExpression(), scope);
            std::unordered_set<String> array_join_column_names;
            
            for (auto & array_join_expression : array_join_node.getJoinExpressions().getNodes())
            {
                auto array_join_expression_alias = array_join_expression->getAlias();
                if (!array_join_expression_alias.empty() && scope.alias_name_to_expression_node.contains(array_join_expression_alias))
                    throw Exception(ErrorCodes::MULTIPLE_EXPRESSIONS_FOR_ALIAS,
                        "ARRAY JOIN expression {} with duplicate alias {}. In scope {}",
                        array_join_expression->formatASTForErrorMessage(),
                        array_join_expression_alias,
                        scope.scope_node->formatASTForErrorMessage());
                
                expressions_visitor.visit(array_join_expression);
                resolveExpressionNode(array_join_expression, scope, false , false );
                auto result_type = array_join_expression->getResultType();
                if (!isArray(result_type))
                    throw Exception(ErrorCodes::TYPE_MISMATCH,