Fix converting to IdentifierQuotingRule values

This commit is contained in:
Tuan Pham Anh 2024-09-11 01:41:43 +00:00
parent 07aee9d8af
commit 9c94993ee0
3 changed files with 5 additions and 5 deletions

View File

@ -95,7 +95,7 @@ static String formattedAST(const ASTPtr & ast)
WriteBufferFromOwnString buf;
IAST::FormatSettings ast_format_settings(
/*ostr_=*/buf, /*one_line=*/true, /*hilite=*/false, /*identifier_quoting_rule=*/IdentifierQuotingRule::WhenNecessary);
/*ostr_=*/buf, /*one_line=*/true, /*hilite=*/false, /*identifier_quoting_rule=*/IdentifierQuotingRule::Always);
ast->format(ast_format_settings);
return buf.str();
}

View File

@ -32,7 +32,6 @@
#include <Common/randomSeed.h>
#include <Common/threadPoolCallbackRunner.h>
#include <Common/typeid_cast.h>
#include "Parsers/IdentifierQuotingStyle.h"
#include <Parsers/ASTExpressionList.h>
#include <Parsers/ASTFunction.h>
@ -41,8 +40,9 @@
#include <Parsers/ASTLiteral.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/ASTSelectWithUnionQuery.h>
#include <Parsers/parseQuery.h>
#include <Parsers/IAST.h>
#include <Parsers/IdentifierQuotingStyle.h>
#include <Parsers/parseQuery.h>
#include <Analyzer/ColumnNode.h>
#include <Analyzer/FunctionNode.h>
@ -1104,7 +1104,7 @@ std::optional<QueryPipeline> StorageDistributed::distributedWriteFromClusterStor
{
WriteBufferFromOwnString buf;
IAST::FormatSettings ast_format_settings(
/*ostr_=*/buf, /*one_line=*/true, /*hilite=*/false, /*identifier_quoting_rule=*/IdentifierQuotingRule::WhenNecessary);
/*ostr_=*/buf, /*one_line=*/true, /*hilite=*/false, /*identifier_quoting_rule=*/IdentifierQuotingRule::Always);
new_query->IAST::format(ast_format_settings);
new_query_str = buf.str();
}

View File

@ -5691,7 +5691,7 @@ std::optional<QueryPipeline> StorageReplicatedMergeTree::distributedWriteFromClu
{
WriteBufferFromOwnString buf;
IAST::FormatSettings ast_format_settings(
/*ostr_=*/buf, /*one_line=*/true, /*hilite=*/false, /*identifier_quoting_rule=*/IdentifierQuotingRule::WhenNecessary);
/*ostr_=*/buf, /*one_line=*/true, /*hilite=*/false, /*identifier_quoting_rule=*/IdentifierQuotingRule::Always);
query.IAST::format(ast_format_settings);
query_str = buf.str();
}