v.24.3Improvement

Add Flag for Nullable Sorting in Full-Sorting Merge Join Algorithm

Add a flag for the full-sorting merge join algorithm to treat null as biggest/smallest. So the behavior can be compitable with other SQL systems, like Apache Spark. #60896 (loudongfeng).
Added a flag to the full-sorting merge join algorithm that allows treating null values as either the biggest or smallest, aligning ClickHouse behavior with other SQL systems such as Apache Spark.

Why it matters

This feature addresses compatibility issues by enabling users to control how null values are handled during merge joins, ensuring consistent join results when integrating or migrating queries from systems like Apache Spark.

How to use it

Users can enable this behavior by setting the new flag in the full-sorting merge join algorithm options to specify whether nulls should be treated as biggest or smallest during the join operation.