**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)
```
sort_column_list_node_size,
                    scope.scope_node->formatASTForErrorMessage());
            }
            sort_node.getExpression() = sort_column_list_node->getNodes().front();
        }
        size_t sort_expression_projection_names_size = sort_expression_projection_names.size();
        if (sort_expression_projection_names_size != 1)
            throw Exception(ErrorCodes::LOGICAL_ERROR,
                "Sort expression expected 1 projection name. Actual {}",
                sort_expression_projection_names_size);
        if (sort_node.hasFillFrom())
        {
            fill_from_expression_projection_names = resolveExpressionNode(sort_node.getFillFrom(), scope, false , false );
            const auto * constant_node = sort_node.getFillFrom()->as<ConstantNode>();
            if (!constant_node || !isColumnedAsNumber(constant_node->getResultType()))
                throw Exception(ErrorCodes::INVALID_WITH_FILL_EXPRESSION,
                    "Sort FILL FROM expression must be constant with numeric type. Actual {}. In scope {}",
                    sort_node.getFillFrom()->formatASTForErrorMessage(),
                    scope.scope_node->formatASTForErrorMessage());
            size_t fill_from_expression_projection_names_size = fill_from_expression_projection_names.size();
            if (fill_from_expression_projection_names_size != 1)
                throw Exception(ErrorCodes::LOGICAL_ERROR,
                    "Sort node FILL FROM expression expected 1 projection name. Actual {}",
                    fill_from_expression_projection_names_size);
        }
        if (sort_node.hasFillTo())
        {
            fill_to_expression_projection_names = resolveExpressionNode(sort_node.getFillTo(), scope, false , false );
            const auto * constant_node = sort_node.getFillTo()->as<ConstantNode>();
            if (!constant_node || !isColumnedAsNumber(constant_node->getResultType()))