mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 11:04:10 +00:00
a5a8ecfe42
fuzzer sometimes [1] may inserts tupleElement() created from ASTLiteral: Function_tupleElement, 0xx -ExpressionList_, 0xx --Literal_Int64_255, 0xx --Literal_Int64_100, 0xx And in this case it will be printed as "255.100", which later will be parsed as float, and formatting will be inconsistent. So instead of printing it as regular tuple, let's print it as ExpressionList instead (i.e. with ", " delimiter). Simple reproducer: void ast() { auto arg1 = std::make_shared<ASTLiteral>(Field(255)); auto arg2 = std::make_shared<ASTLiteral>(Field(100)); auto func = makeASTFunction("tupleElement", arg1, arg2); auto ast = func; std::cerr << ast->formatForErrorMessage() << std::endl; std::cerr << ast->dumpTree() << std::endl; } [1]: https://clickhouse-test-reports.s3.yandex.net/23517/f1187aeb69109c88f0be978b8083080c7a843820/fuzzer_debug/report.html#fail1
18 lines
506 B
Plaintext
18 lines
506 B
Plaintext
SelectWithUnionQuery (children 1)
|
|
ExpressionList (children 1)
|
|
SelectQuery (children 1)
|
|
ExpressionList (children 1)
|
|
Function tupleElement (children 1)
|
|
ExpressionList (children 2)
|
|
Literal UInt64_255
|
|
Literal UInt64_100
|
|
SelectWithUnionQuery (children 1)
|
|
ExpressionList (children 1)
|
|
SelectQuery (children 1)
|
|
ExpressionList (children 1)
|
|
Function tupleElement (children 1)
|
|
ExpressionList (children 2)
|
|
Literal Tuple_(UInt64_255, UInt64_1)
|
|
Literal UInt64_1
|
|
255
|