v.24.1Improvement

Error Handling Improvement for Paste JOIN Queries in ClickHouse

When executing some queries, which require a lot of streams for reading data, the error "Paste JOIN requires sorted tables only" was previously thrown. Now the numbers of streams resize to 1 in that case. #58608 (Yarik Briukhovetskyi).
ClickHouse now automatically reduces the number of data streams to 1 when executing queries that require many streams for reading data, preventing the "Paste JOIN requires sorted tables only" error.

Why it matters

This feature addresses the issue where queries needing numerous streams could cause the error "Paste JOIN requires sorted tables only". By limiting the number of streams to 1 in such cases, the query execution becomes stable and error-free, improving reliability when working with large, complex JOIN operations.

How to use it

Users do not need to manually enable this feature; it is applied automatically during query execution when the conditions triggering the error occur.