mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Merge pull request #44479 from ClickHouse/more-robust-astselectquery-formatimpl
More robust ASTSelectQuery::formatImpl()
This commit is contained in:
commit
1974e1bf8c
@ -202,7 +202,7 @@ Google OSS-Fuzz can be found at `docker/fuzz`.
|
||||
We also use simple fuzz test to generate random SQL queries and to check that the server does not die executing them.
|
||||
You can find it in `00746_sql_fuzzy.pl`. This test should be run continuously (overnight and longer).
|
||||
|
||||
We also use sophisticated AST-based query fuzzer that is able to find huge amount of corner cases. It does random permutations and substitutions in queries AST. It remembers AST nodes from previous tests to use them for fuzzing of subsequent tests while processing them in random order. You can learn more about this fuzzer in [this blog article](https://clickhouse.com/blog/en/2021/fuzzing-clickhouse/).
|
||||
We also use sophisticated AST-based query fuzzer that is able to find huge amount of corner cases. It does random permutations and substitutions in queries AST. It remembers AST nodes from previous tests to use them for fuzzing of subsequent tests while processing them in random order. You can learn more about this fuzzer in [this blog article](https://clickhouse.com/blog/fuzzing-click-house).
|
||||
|
||||
## Stress test
|
||||
|
||||
|
@ -115,6 +115,8 @@ void ASTSelectQuery::formatImpl(const FormatSettings & s, FormatState & state, F
|
||||
|
||||
if (group_by_with_grouping_sets)
|
||||
{
|
||||
if (!groupBy()) /// sanity check, issue 43049
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Corrupt AST");
|
||||
auto nested_frame = frame;
|
||||
nested_frame.surround_each_list_element_with_parens = true;
|
||||
nested_frame.expression_list_prepend_whitespace = false;
|
||||
|
Loading…
Reference in New Issue
Block a user