v.22.2Improvement
Add Options for clickhouse-format: max_query_size and max_parser_depth
Add options forclickhouse-format. Which close #30528 -max_query_size-max_parser_depth. #34349 (李扬).
Why it matters
These options allow users to configure limits on the size of the input query and the maximum depth of the parser recursion, improving stability and preventing resource exhaustion when formatting very large or complex queries.How to use it
Use theclickhouse-format command-line tool with the new options --max_query_size and --max_parser_depth to specify the desired limits, for example:clickhouse-format --max_query_size=100000 --max_parser_depth=100