See presentation:
https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup38/join.pdf