v.21.4Improvements

Support More Cases for Rewriting CROSS JOIN to INNER JOIN

Support more cases to rewrite CROSS JOIN to INNER JOIN. #20392 (Vladimir).
Enhanced ClickHouse query planner to support more scenarios where CROSS JOIN can be automatically rewritten to INNER JOIN.

Why it matters

This feature improves query optimization by enabling the query engine to convert CROSS JOIN operations into more efficient INNER JOIN when applicable, reducing computational overhead and improving execution performance.

How to use it

Users benefit from this optimization automatically when writing queries with CROSS JOIN; no additional configuration is needed. The query planner will detect eligible cases and rewrite the join accordingly during query execution.