v.19.5New Features
Rewrite Multiple COMMA JOIN to CROSS JOIN
Rewrite multipleCOMMA JOINtoCROSS JOIN. Then rewrite them toINNER JOINif possible. #4661 (Artem Zuikov)
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 withCOMMA 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.