v.19.14Improvement

Disable "read in Order" Optimization for Aggregation Without Keys

Disable "read in order" optimization for aggregation without keys. #6599 (Anton Popov)
Disabled the "read in order" optimization for aggregation queries without grouping keys.

Why it matters

The feature addresses incorrect query results caused by applying "read in order" optimization to aggregation queries that do not have grouping keys. By disabling this optimization for such cases, it ensures query correctness and data integrity.

How to use it

This change is applied automatically in ClickHouse. Users do not need to enable or disable any settings manually; aggregation queries without keys will no longer use the "read in order" optimization by default.