v.23.3Improvement

Prevent Long Chains of Aggregate Function Combinators

Prevent using too long chains of aggregate function combinators (they can lead to slow queries in the analysis stage). This closes #47715. #47716 (Alexey Milovidov).
Prevent excessively long chains of aggregate function combinators to avoid slow query analysis stages in ClickHouse.

Why it matters

Long chains of aggregate function combinators can degrade query performance by causing slowdowns during the query analysis stage. This feature introduces a limitation to prevent such long chains, helping to maintain query efficiency and reliability.

How to use it

This feature is enabled by default as part of query analysis and automatically restricts the use of overly long chains of aggregate function combinators. Users benefit from improved query performance without any additional configuration needed.