v.22.8Improvement

Fix Aggregate Projections with External Aggregation; Marked as Improvement Due to Rare Use Case

Fix building aggregate projections when external aggregation is on. Mark as improvement because the case is rare and there exists easy workaround to fix it via changing settings. This fixes #39667 . #39671 (Amos Bird).
Fix building aggregate projections when external aggregation is enabled.

Why it matters

This improvement addresses an issue where aggregate projections fail to build properly if external aggregation is turned on. Although this scenario is rare and can be worked around by changing settings, the fix enhances stability and correctness of query execution involving aggregate projections under these conditions.

How to use it

To benefit from this fix, users with external aggregation enabled do not need to change their queries or settings after upgrading. If encountering issues with aggregate projections and external aggregation, simply update to the version containing this fix. Previously, users could workaround by disabling external aggregation or adjusting related settings.