v.21.11New Features
Queries with JOIN ON Now Support Disjunctions (OR)
Queries with JOIN ON now supports disjunctions (OR). #21320 (Ilya Golshtein).
Why it matters
This feature allows users to write more complex join conditions using logicalOR, enabling more flexible data relationships and improving query expressiveness.How to use it
Users can now includeOR expressions directly within the ON clause of JOIN statements. For example:SELECT *
FROM table1
JOIN table2 ON (table1.id = table2.id OR table1.key = table2.key)This extends the standard join syntax by allowing multiple alternative join conditions.