v.21.3Improvement

Move Non-JOIN Conditions to WHERE Clause

Move conditions that are not related to JOIN to WHERE clause. #18720. #19685 (hexiaoting).
Conditions unrelated to JOINs are now moved automatically from the JOIN ON clause to the WHERE clause during query processing.

Why it matters

This feature improves query clarity and optimization by separating JOIN conditions from filter conditions. It helps the query planner better understand and optimize filter predicates, leading to potentially improved query performance and more predictable execution.

How to use it

Users do not need to change their queries explicitly. The ClickHouse query processor automatically relocates conditions not related to the JOIN key expressions from the ON clause to the WHERE clause during query execution.