Fixed a bug
Contributed to open source
Fixed a bug in ClickHouse query planner causing incorrect results in distributed queries with LIMIT BY clause.

https://github.com/ClickHouse/ClickHouse/pull/4708