Performance of ORDER BY on sorting key prefix with braces is 2x slower than without due to inefficient execution plan.
Without braces:
```sql
EXPLAIN PIPELINE
SELECT
    CounterID,
    EventDate
FROM hits_v1
ORDER BY
    CounterID ASC,
    EventDate ASC

┌─explain───────────────────────────┐
│ (Expression)                      │
│ ExpressionTransform               │
│   (Sorting)                       │
│   MergingSortedTransform 19 → 1   │
│     (Expression)                  │
│     ExpressionTransform × 19      │
│       (ReadFromMergeTree)         │
│       MergeTreeInOrder × 19 0 → 1 │
└───────────────────────────────────┘
```
With braces:
```sql
EXPLAIN PIPELINE
SELECT
    CounterID,
    EventDate
FROM hits_v1
ORDER BY (CounterID, EventDate) ASC

┌─explain────────────────────────────────┐
│ (Expression)                           │
│ ExpressionTransform                    │
│   (Sorting)                            │
│   MergingSortedTransform 16 → 1        │
│     MergeSortingTransform × 16         │
│       LimitsCheckingTransform × 16     │
│         PartialSortingTransform × 16   │
│           (Expression)                 │
│           ExpressionTransform × 16     │
│             (ReadFromMergeTree)        │
│             MergeTreeThread × 16 0 → 1 │
└────────────────────────────────────────┘
```
select_expr_list->children.push_back(std::make_shared<ASTLiteral>(1u));
        auto select_query = std::make_shared<ASTSelectQuery>();
        select_query->children.push_back(select_expr_list);
        select_query->setExpression(ASTSelectQuery::Expression::SELECT, select_expr_list);
        select_query->setExpression(ASTSelectQuery::Expression::TABLES, tables_in_select);
        ASTPtr limit_length_ast = std::make_shared<ASTLiteral>(Field(static_cast<UInt64>(1)));
        select_query->setExpression(ASTSelectQuery::Expression::LIMIT_LENGTH, std::move(limit_length_ast));
        auto select_with_union_query = std::make_shared<ASTSelectWithUnionQuery>();
        select_with_union_query->list_of_selects = std::make_shared<ASTExpressionList>();
        select_with_union_query->list_of_selects->children.push_back(std::move(select_query));
        select_with_union_query->children.push_back(select_with_union_query->list_of_selects);
        auto new_subquery = std::make_shared<ASTSubquery>();
        new_subquery->children.push_back(select_with_union_query);
        auto function = makeASTFunction("in", std::make_shared<ASTLiteral>(1u), new_subquery);
        func = *function;
    }
};
using ExistsExpressionVisitor = InDepthNodeVisitor<OneTypeMatcher<ExistsExpressionData>, false>;
void translateQualifiedNames(ASTPtr & query, const ASTSelectQuery & select_query, const NameSet & source_columns_set,
                             const TablesWithColumns & tables_with_columns)
{
    LogAST log;
    TranslateQualifiedNamesVisitor::Data visitor_data(source_columns_set, tables_with_columns);
    TranslateQualifiedNamesVisitor visitor(visitor_data, log.stream());
    visitor.visit(query);
    
    if (select_query.select()->children.empty())
        throw Exception("Empty list of columns in SELECT query", ErrorCodes::EMPTY_LIST_OF_COLUMNS_QUERIED);
}
void replaceWithSumCount(String column_name, ASTFunction & func)