v.20.1New Feature
Add SEMI and ANTI JOINs; rename ANY INNER JOIN to SEMI LEFT JOIN
Add newSEMIandANTI JOIN. OldANY INNER JOINbehaviour now available asSEMI LEFT JOIN. #7665 (Artem Zuikov)
Why it matters
This feature clarifies and extends join semantics in ClickHouse by explicitly supporting semi and anti joins. It addresses the need for more precise control over join behaviors, enabling users to perform existence checks (SEMI JOIN) and non-existence checks (ANTI JOIN) more intuitively and efficiently.How to use it
Users can useSEMI JOIN and ANTI JOIN explicitly in their SQL queries to perform semi and anti joins respectively. The previously used ANY INNER JOIN syntax is now replaced by SEMI LEFT JOIN for backwards compatibility and clearer semantics. For example:SELECT FROM table1 <code>SEMI JOIN</code> table2 ON table1.key = table2.key;SELECT FROM table1 <code>ANTI JOIN</code> table2 ON table1.key = table2.key;