v.21.12New Features
Support JOIN ON 1 = 1 with CROSS JOIN semantics
Support JOIN ON 1 = 1 that have CROSS JOIN semantic. This closes #25578. #25894 (Vladimir C).Why it matters
This feature allows users to explicitly write aJOIN clause with ON 1 = 1 condition, enabling the semantic of a CROSS JOIN in query statements. It improves query expressiveness and compatibility with SQL standards, making it easier to perform cross joins without requiring special syntax.How to use it
To use this feature, write aJOIN followed by ON 1 = 1 in your SQL query. For example:SELECT * FROM table1 JOIN table2 ON 1 = 1This will behave as a
CROSS JOIN, producing the Cartesian product of the two tables.