mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Better check for inconsistent formatting
This commit is contained in:
parent
b8b6150374
commit
c2555dfb27
@ -721,7 +721,7 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
|
||||
/// Verify that AST formatting is consistent:
|
||||
/// If you format AST, parse it back, and format it again, you get the same string.
|
||||
|
||||
String formatted1 = ast->formatForErrorMessage();
|
||||
String formatted1 = ast->formatWithPossiblyHidingSensitiveData(0, true, true);
|
||||
|
||||
ASTPtr ast2 = parseQuery(parser,
|
||||
formatted1.data(),
|
||||
@ -730,7 +730,7 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
|
||||
|
||||
chassert(ast2);
|
||||
|
||||
String formatted2 = ast2->formatForErrorMessage();
|
||||
String formatted2 = ast2->formatWithPossiblyHidingSensitiveData(0, true, true);
|
||||
|
||||
if (formatted1 != formatted2)
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR,
|
||||
|
Loading…
Reference in New Issue
Block a user