v.25.4Experimental Feature
Support correlated subqueries as an argument
Support correlated subqueries as an argument ofEXISTSexpression in theWHEREclause. Closes #72459. #76078 (Dmitry Novik).
Why it matters
This feature allows users to write more expressive and powerful queries by enabling the use of correlated subqueries as arguments to theEXISTS predicate. It solves the limitation where only uncorrelated subqueries were previously supported with EXISTS, thus expanding the flexibility and capability of conditional filtering in queries.How to use it
Users can now include correlated subqueries inside theEXISTS expression in the WHERE clause as usual. For example:SELECT *
FROM table1 t1
WHERE EXISTS (
SELECT 1
FROM table2 t2
WHERE t2.some_column = t1.some_column
);