ClickHouse uses "grace hash" GROUP BY with the number of buckets = 256.
It can do size about 256 times larger than a memory because only one bucket has to be in memory while merging. It works for distributed query processing as well and is enabled by default.
About the linked issue - it looks like it is related to some extra optimization on top of what already exists.