v.20.1New Feature

Add any_join_distinct_right_table_keys Setting for ANY INNER JOIN Behavior

Add setting any_join_distinct_right_table_keys which enables old behaviour for ANY INNER JOIN. #7665 (Artem Zuikov)
Added the setting any_join_distinct_right_table_keys to enable the old behavior for ANY INNER JOIN operations in ClickHouse.

Why it matters

This setting addresses changes in ANY INNER JOIN semantics by allowing users to revert to the previous join behavior, preserving compatibility and expected query results for existing workloads.

How to use it

To use the old ANY INNER JOIN behavior, set the parameter any_join_distinct_right_table_keys to 1 in the session, user profile, or configuration file. For example:

SET any_join_distinct_right_table_keys = 1;


This will enable the legacy join semantics for the duration of the session or until the setting is changed.