v.19.16Improvement

Support Missing Inequalities for ASOF JOIN

Support missing inequalities for ASOF JOIN. It's possible to join less-or-equal variant and strict greater and less variants for ASOF column in ON syntax. #7282 (Artem Zuikov)
Support for additional inequality variants in ASOF JOIN conditions. ClickHouse now allows using less-or-equal (<=), strict greater (>), and strict less (<) inequalities on ASOF join keys in the ON clause.

Why it matters

Enhance flexibility and expressiveness in ASOF JOINs. Previously, only limited inequality comparisons were supported in ASOF JOIN conditions. This feature enables users to specify a wider range of inequalities, improving query precision and enabling more complex temporal or interval-based join logic.

How to use it

In an ASOF JOIN, specify any of the supported inequalities (<=, <, >) for the ASOF column in the ON clause. For example, use:
SELECT ...
FROM table1
ASOF JOIN table2 ON table1.key <= table2.key

to perform a less-or-equal inequality join.