v.21.6Improvement

Fix rare exception when querying MergeTree table with NULL in WHERE condition

When selecting from MergeTree table with NULL in WHERE condition, in rare cases, exception was thrown. This closes #20019. #22978 (alexey-milovidov).
Fixed an exception occurring when selecting from a MergeTree table with a NULL condition in the WHERE clause.

Why it matters

This fix addresses a rare error that caused an exception to be thrown when a WHERE condition included NULL values in queries on MergeTree tables. The correction improves query stability and reliability for users working with NULL conditions.

How to use it

After updating to the new version containing this fix, users can safely use NULL in WHERE conditions with MergeTree tables without encountering exceptions. No additional configuration is required.