v.19.5New Features

Rewrite Multiple COMMA JOIN to CROSS JOIN

Rewrite multiple COMMA JOIN to CROSS JOIN. Then rewrite them to INNER JOIN if possible. #4661 (Artem Zuikov)
Rewrite multiple COMMA JOIN in queries as CROSS JOIN and subsequently optimize them to INNER JOIN when applicable.

Why it matters

This feature improves query clarity and execution efficiency by transforming implicit joins (COMMA JOIN) into explicit joins (CROSS JOIN or INNER JOIN). It helps the query planner better understand join intentions, potentially enabling more optimized query execution.

How to use it

Users write their queries using the standard SQL syntax with COMMA JOIN as usual. The query processor automatically rewrites multiple COMMA JOIN clauses to CROSS JOIN, and if join conditions are present, further optimizes them to INNER JOIN internally without requiring any changes in user queries.