v.21.9New Feature

Support Expressions in JOIN ON Section

Support expressions in JOIN ON section. Close #21868. #24420 (Vladimir C).
ClickHouse now supports expressions in the JOIN ON clause, allowing users to specify complex conditions when joining tables.

Why it matters

This feature enables more flexible and expressive join conditions beyond simple column equality, solving limitations in query capabilities and enhancing data retrieval accuracy and complexity.

How to use it

Users can include arbitrary expressions within the JOIN ON section of their SQL queries to define join conditions. For example:

SELECT * FROM table1
JOIN table2 ON (table1.id + 1) = table2.id

This allows for computation or transformation of columns directly in the join condition.