v.21.2Improvements
Fix stack overflow in distributed queries with deeply nested data types in ClickHouse
In distributed queries if the settingasync_socket_for_remoteis enabled, it was possible to get stack overflow at least in debug build configuration if very deeply nested data type is used in table (e.g.Array(Array(Array(...more...)))). This fixes #19108. This change introduces minor backward incompatibility: excessive parenthesis in type definitions no longer supported, example:Array((UInt8)). #19736 (alexey-milovidov).
Why it matters
The feature addresses a stability problem causing stack overflow errors during distributed queries involving deeply nested data types with asynchronous socket communication. It improves reliability and prevents crashes in such scenarios. Additionally, it removes support for excessive parentheses in type definitions (e.g.,Array((UInt8))), simplifying type parsing.How to use it
To benefit from this fix, enable the settingasync_socket_for_remote for distributed queries as needed. Avoid using excessive parentheses in type definitions; for example, use Array(UInt8) instead of Array((UInt8)).