ClickHouse and ProxySQL queries rewrite
ProxySQL is a popular open source, high performance and protocol-aware proxy server for MySQL and its forks. Since September 2017 ProxySQL supports ClickHouse as a backend, so clients can connect to ClickHouse via MySQL protocol. In practice, this helps MySQL-aware applications to start using ClickHouse as without changes in the client library.
To avoid some limitations to this approach, ProxySQL creator René Cannaò added additional functionality for query rewrite. With his permission, we cross-post his article describing new functionality in our blog.