ClickHouse/src/Parsers
Azat Khuzhin 8bca80f4dd Fix REPLACE modifier formatting (forbid omitting brackets)
It is too tricky to verify does brackets required or not, i.e. "SELECT *
REPLACE(1/3/3 AS dummy)" will be formatted to "SELECT * REPLACE (1/3)/3 AS dummy"
which is already invalid query.

So let's simply always print them.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
v2: move the fix into correct place ASTColumnsReplaceTransformer::formatImpl() instead of ASTColumnsReplaceTransformer::Replacement::formatImpl()
2024-08-05 08:59:28 +02:00
..
Access Merge pull request #65626 from tonickkozlov/tonickkozlov/x509-san-validation 2024-07-02 11:20:01 +00:00
examples Fix build 2024-07-24 19:51:22 +02:00
fuzzers impl 2024-07-26 23:05:56 +01:00
HiliteComparator
Kusto Fix errors 2024-06-17 05:12:45 +02:00
MySQL Fix error 2024-07-24 09:05:06 +02:00
PRQL
tests optimize drop tables 2024-04-06 19:59:45 +08:00
ASTAlterNamedCollectionQuery.cpp
ASTAlterNamedCollectionQuery.h
ASTAlterQuery.cpp Fix alter query clone with SQL security 2024-06-07 02:20:03 -04:00
ASTAlterQuery.h Merge branch 'master' into hanfei/stats_uniq 2024-05-14 18:16:52 +02:00
ASTAssignment.h
ASTAsterisk.cpp
ASTAsterisk.h
ASTBackupQuery.cpp Useless changes 2024-05-10 04:53:29 +02:00
ASTBackupQuery.h
ASTCheckQuery.h Useless changes 2024-05-09 03:11:02 +02:00
ASTCollation.cpp
ASTCollation.h
ASTColumnDeclaration.cpp Introduce ASTDataType 2024-07-19 00:20:03 +02:00
ASTColumnDeclaration.h support statistics on replicated merge tree 2024-06-06 20:18:42 +02:00
ASTColumnsMatcher.cpp
ASTColumnsMatcher.h
ASTColumnsTransformers.cpp Fix REPLACE modifier formatting (forbid omitting brackets) 2024-08-05 08:59:28 +02:00
ASTColumnsTransformers.h
ASTConstraintDeclaration.cpp
ASTConstraintDeclaration.h
ASTCreateFunctionQuery.cpp
ASTCreateFunctionQuery.h
ASTCreateIndexQuery.cpp
ASTCreateIndexQuery.h
ASTCreateNamedCollectionQuery.cpp
ASTCreateNamedCollectionQuery.h
ASTCreateQuery.cpp Merge pull request #66590 from vitlibar/move-view-targets-to-separate-ast 2024-07-22 17:20:09 +00:00
ASTCreateQuery.h Merge pull request #66590 from vitlibar/move-view-targets-to-separate-ast 2024-07-22 17:20:09 +00:00
ASTDatabaseOrNone.cpp
ASTDatabaseOrNone.h
ASTDataType.cpp Introduce ASTDataType 2024-07-19 00:20:03 +02:00
ASTDataType.h Fix error 2024-07-27 04:33:55 +02:00
ASTDeleteQuery.cpp
ASTDeleteQuery.h Merge branch 'master' into fix-trash-query-kind 2023-02-02 04:26:49 +01:00
ASTDescribeCacheQuery.cpp
ASTDescribeCacheQuery.h
ASTDictionary.cpp
ASTDictionary.h
ASTDictionaryAttributeDeclaration.cpp
ASTDictionaryAttributeDeclaration.h
ASTDropFunctionQuery.cpp SQLUserDefinedFunctions support ON CLUSTER 2021-10-27 11:28:21 +03:00
ASTDropFunctionQuery.h
ASTDropIndexQuery.cpp
ASTDropIndexQuery.h
ASTDropNamedCollectionQuery.cpp Fix named collections AST formatters (if [not] exists) 2023-07-27 22:11:32 +03:00
ASTDropNamedCollectionQuery.h
ASTDropQuery.cpp remove whitespaces 2024-05-01 18:31:17 +02:00
ASTDropQuery.h cmment 2024-04-10 09:50:47 +08:00
ASTExplainQuery.h Reapply "Remove some unnecessary UNREACHABLEs" 2024-05-29 13:37:47 +00:00
ASTExpressionList.cpp
ASTExpressionList.h
ASTExternalDDLQuery.h
ASTForeignKeyDeclaration.h
ASTFunction.cpp Fix inconsistent formatting of CODEC and STATISTICS 2024-07-30 04:05:43 +02:00
ASTFunction.h Fix inconsistent formatting of CODEC and STATISTICS 2024-07-30 04:05:43 +02:00
ASTFunctionWithKeyValueArguments.cpp
ASTFunctionWithKeyValueArguments.h
ASTHelpers.h
ASTIdentifier_fwd.h
ASTIdentifier.cpp batter 2024-03-29 09:53:50 +08:00
ASTIdentifier.h batter 2024-03-29 09:53:50 +08:00
ASTIndexDeclaration.cpp fix 2024-04-03 11:52:55 +00:00
ASTIndexDeclaration.h Fix crash in index definition containing sql udf 2024-04-03 10:45:45 +00:00
ASTInsertQuery.cpp Remove support for INSERT WATCH query 2024-04-08 05:37:09 +02:00
ASTInsertQuery.h Remove support for INSERT WATCH query 2024-04-08 05:37:09 +02:00
ASTInterpolateElement.cpp
ASTInterpolateElement.h
ASTKillQueryQuery.cpp
ASTKillQueryQuery.h Useless changes 2024-05-09 01:08:33 +02:00
ASTLiteral.cpp
ASTLiteral.h add comments 2024-06-04 09:36:14 +08:00
ASTNameTypePair.cpp
ASTNameTypePair.h
ASTOptimizeQuery.cpp
ASTOptimizeQuery.h
ASTOrderByElement.cpp Revert "Revert "Rich syntax highlighting in the client"" 2024-04-10 21:39:02 +02:00
ASTOrderByElement.h Analyzer: Fix query parameters 2024-04-02 17:47:00 +02:00
ASTPartition.cpp
ASTPartition.h Make as flexible as it can be 2023-10-13 18:51:32 +02:00
ASTProjectionDeclaration.cpp
ASTProjectionDeclaration.h
ASTProjectionSelectQuery.cpp
ASTProjectionSelectQuery.h
ASTQualifiedAsterisk.cpp
ASTQualifiedAsterisk.h
ASTQueryParameter.cpp Fix #56258, attempt II 2023-11-10 14:03:13 +00:00
ASTQueryParameter.h
ASTQueryWithOnCluster.cpp
ASTQueryWithOnCluster.h
ASTQueryWithOutput.cpp
ASTQueryWithOutput.h
ASTQueryWithTableAndOutput.cpp
ASTQueryWithTableAndOutput.h
ASTRefreshStrategy.cpp
ASTRefreshStrategy.h
ASTRenameQuery.h
ASTSampleRatio.cpp
ASTSampleRatio.h
ASTSelectIntersectExceptQuery.cpp
ASTSelectIntersectExceptQuery.h Useless changes 2024-05-09 01:08:33 +02:00
ASTSelectQuery.cpp Analyzer support recursive CTEs 2024-04-28 12:52:17 +03:00
ASTSelectQuery.h Analyzer support recursive CTEs 2024-04-28 12:52:17 +03:00
ASTSelectWithUnionQuery.cpp
ASTSelectWithUnionQuery.h
ASTSetQuery.cpp
ASTSetQuery.h Useless changes 2024-05-09 02:07:04 +02:00
ASTShowColumnsQuery.cpp
ASTShowColumnsQuery.h
ASTShowEngineQuery.h
ASTShowFunctionsQuery.cpp
ASTShowFunctionsQuery.h
ASTShowIndexesQuery.cpp
ASTShowIndexesQuery.h
ASTShowProcesslistQuery.h
ASTShowSettingQuery.cpp Add SHOW SETTING query 2023-10-25 18:49:00 +03:00
ASTShowSettingQuery.h
ASTShowTablesQuery.cpp
ASTShowTablesQuery.h
ASTSQLSecurity.cpp Fix alter query clone with SQL security 2024-06-07 02:20:03 -04:00
ASTSQLSecurity.h
ASTStatisticsDeclaration.cpp fix tests 2024-04-03 13:42:26 +02:00
ASTStatisticsDeclaration.h
ASTSubquery.cpp
ASTSubquery.h Analyzer support recursive CTEs 2024-04-28 12:52:17 +03:00
ASTSystemQuery.cpp Add SYSTEM UNLOAD PRIMARY KEY 2024-04-17 21:24:59 +02:00
ASTSystemQuery.h Add SYSTEM UNLOAD PRIMARY KEY 2024-04-17 21:24:59 +02:00
ASTTableOverrides.cpp
ASTTableOverrides.h Fix parameterized queries 2023-03-11 20:16:06 +01:00
ASTTablesInSelectQuery.cpp Add test from #66378 2024-07-23 09:23:18 +02:00
ASTTablesInSelectQuery.h Useless changes 2024-05-09 01:08:33 +02:00
ASTTimeInterval.cpp
ASTTimeInterval.h
ASTTransactionControl.cpp
ASTTransactionControl.h
ASTTTLElement.cpp
ASTTTLElement.h
ASTUndropQuery.cpp
ASTUndropQuery.h
ASTUseQuery.h
ASTViewTargets.cpp Add const to cycles. 2024-07-21 11:52:10 +02:00
ASTViewTargets.h Add more comments. 2024-07-18 21:26:33 +02:00
ASTWatchQuery.h
ASTWindowDefinition.cpp
ASTWindowDefinition.h
ASTWithAlias.cpp
ASTWithAlias.h
ASTWithElement.cpp
ASTWithElement.h
CMakeLists.txt Remove iostream_debug_helpers 2024-06-04 05:48:45 +02:00
CommonParsers.cpp
CommonParsers.h Merge pull request #65626 from tonickkozlov/tonickkozlov/x509-san-validation 2024-07-02 11:20:01 +00:00
CreateQueryUUIDs.cpp Move view targets to separate AST class "ASTViewTargets" 2024-07-16 14:33:13 +02:00
CreateQueryUUIDs.h Move view targets to separate AST class "ASTViewTargets" 2024-07-16 14:33:13 +02:00
DumpASTNode.h
ExpressionElementParsers.cpp Fix inconsistent formatting of CODEC and STATISTICS 2024-07-30 04:05:43 +02:00
ExpressionElementParsers.h Remove unused local variables 2024-07-14 23:16:53 +02:00
ExpressionListParsers.cpp Compatibility 2024-07-24 10:25:23 +02:00
ExpressionListParsers.h Fix error 2024-07-24 09:25:22 +02:00
FieldFromAST.cpp Fix 2024-05-14 13:09:56 +02:00
FieldFromAST.h
formatAST.cpp
formatAST.h update fmtlib version to 9.1.0 2024-06-07 06:44:36 +00:00
formatSettingName.cpp Move StringUtils.h/cpp back to Common/ 2024-05-19 09:39:36 +00:00
formatSettingName.h
FunctionParameterValuesVisitor.cpp Addressed review comments 2024-06-11 11:53:33 +02:00
FunctionParameterValuesVisitor.h Support running function for parameterized view value assignment 2024-05-08 10:55:26 +02:00
FunctionSecretArgumentsFinder.h
FunctionSecretArgumentsFinderAST.h Fix inconsistent formatting of CODEC and STATISTICS 2024-07-30 04:05:43 +02:00
getInsertQuery.cpp
getInsertQuery.h
IAST_fwd.h
IAST.cpp
IAST.h Fix inconsistent formatting of CODEC and STATISTICS 2024-07-30 04:05:43 +02:00
IdentifierQuotingStyle.h Useless changes 2024-05-09 01:08:33 +02:00
InsertQuerySettingsPushDownVisitor.cpp
InsertQuerySettingsPushDownVisitor.h
IParser.cpp Useless changes 2024-05-09 03:11:02 +02:00
IParser.h Useless changes 2024-05-09 01:08:33 +02:00
IParserBase.cpp Revert "Revert "Rich syntax highlighting in the client"" 2024-04-10 21:39:02 +02:00
IParserBase.h
isDiskFunction.cpp
isDiskFunction.h
isUnquotedIdentifier.cpp Avoid generating named tuple for special keywords 2024-07-18 02:00:45 +08:00
isUnquotedIdentifier.h Avoid generating named tuple for special keywords 2024-07-18 02:00:45 +08:00
Lexer.cpp A tiny fix for fancy quotes 2024-06-06 04:20:20 +02:00
Lexer.h Useless changes 2024-05-09 01:08:33 +02:00
LiteralEscapingStyle.h Useless changes 2024-05-09 01:08:33 +02:00
makeASTForLogicalFunction.cpp Useless changes 2024-05-10 04:53:29 +02:00
makeASTForLogicalFunction.h
NullsAction.h
obfuscateQueries.cpp Move StringUtils.h/cpp back to Common/ 2024-05-19 09:39:36 +00:00
obfuscateQueries.h
parseDatabaseAndTableName.cpp Revert "Revert "Rich syntax highlighting in the client"" 2024-04-10 21:39:02 +02:00
parseDatabaseAndTableName.h
parseIdentifierOrStringLiteral.cpp
parseIdentifierOrStringLiteral.h
parseIntervalKind.cpp
parseIntervalKind.h
parseQuery.cpp Fix errors 2024-06-17 05:12:45 +02:00
parseQuery.h Revert "Revert "Rich syntax highlighting in the client"" 2024-04-10 21:39:02 +02:00
ParserAlterNamedCollectionQuery.cpp
ParserAlterNamedCollectionQuery.h
ParserAlterQuery.cpp Fix error 2024-07-22 08:09:39 +02:00
ParserAlterQuery.h
ParserAttachAccessEntity.cpp
ParserAttachAccessEntity.h
ParserBackupQuery.cpp Useless changes 2024-05-10 04:53:29 +02:00
ParserBackupQuery.h
ParserCase.cpp
ParserCase.h
ParserCheckQuery.cpp
ParserCheckQuery.h
ParserCreateFunctionQuery.cpp
ParserCreateFunctionQuery.h
ParserCreateIndexQuery.cpp Compatibility 2024-07-24 10:24:13 +02:00
ParserCreateIndexQuery.h
ParserCreateQuery.cpp Merge branch 'fix-idiotic-code' into ast-data-type 2024-07-26 15:32:15 +02:00
ParserCreateQuery.h Fix error 2024-07-24 09:05:06 +02:00
ParserDatabaseOrNone.cpp
ParserDatabaseOrNone.h
ParserDataType.cpp Fix error 2024-07-19 03:16:23 +02:00
ParserDataType.h
ParserDeleteQuery.cpp
ParserDeleteQuery.h
ParserDescribeCacheQuery.cpp
ParserDescribeCacheQuery.h
ParserDescribeTableQuery.cpp Remove unused local variables 2024-07-14 23:16:53 +02:00
ParserDescribeTableQuery.h
ParserDictionary.cpp Better highlighting of keywords 2024-04-28 00:19:42 +02:00
ParserDictionary.h
ParserDictionaryAttributeDeclaration.cpp
ParserDictionaryAttributeDeclaration.h
ParserDropFunctionQuery.cpp
ParserDropFunctionQuery.h
ParserDropIndexQuery.cpp
ParserDropIndexQuery.h
ParserDropNamedCollectionQuery.cpp
ParserDropNamedCollectionQuery.h
ParserDropQuery.cpp Merge branch 'ClickHouse:master' into truncate_all_tables_from 2024-05-03 19:35:59 +02:00
ParserDropQuery.h
ParserExplainQuery.cpp
ParserExplainQuery.h
ParserExternalDDLQuery.cpp
ParserExternalDDLQuery.h
ParserInsertQuery.cpp Allow trailing comma in the columns list in INSERT query 2024-05-15 04:39:36 +02:00
ParserInsertQuery.h
ParserKillQueryQuery.cpp
ParserKillQueryQuery.h
ParserOptimizeQuery.cpp
ParserOptimizeQuery.h
ParserPartition.cpp Add table system.keywords [Part 1] (#51808) 2024-03-18 16:58:57 +01:00
ParserPartition.h
ParserProjectionSelectQuery.cpp
ParserProjectionSelectQuery.h
ParserQuery.cpp Update ParserQuery.cpp 2024-05-01 18:36:42 +02:00
ParserQuery.h
ParserQueryWithOutput.cpp
ParserQueryWithOutput.h
ParserRefreshStrategy.cpp
ParserRefreshStrategy.h
ParserRenameQuery.cpp Better highlighting of keywords 2024-04-28 00:19:42 +02:00
ParserRenameQuery.h
ParserSampleRatio.cpp
ParserSampleRatio.h
ParserSelectQuery.cpp Analyzer support recursive CTEs 2024-04-28 12:52:17 +03:00
ParserSelectQuery.h
ParserSelectWithUnionQuery.cpp
ParserSelectWithUnionQuery.h
ParserSetQuery.cpp Fix parsing booleans as values of settings. 2024-04-08 13:44:25 +02:00
ParserSetQuery.h
ParserShowColumnsQuery.cpp
ParserShowColumnsQuery.h
ParserShowEngineQuery.h
ParserShowFunctionsQuery.cpp
ParserShowFunctionsQuery.h
ParserShowIndexesQuery.cpp
ParserShowIndexesQuery.h
ParserShowProcesslistQuery.h
ParserShowSettingQuery.cpp
ParserShowSettingQuery.h
ParserShowTablesQuery.cpp Better highlighting of keywords 2024-04-28 00:19:42 +02:00
ParserShowTablesQuery.h
ParserStringAndSubstitution.cpp
ParserStringAndSubstitution.h
ParserSystemQuery.cpp Useless changes 2024-05-09 01:08:33 +02:00
ParserSystemQuery.h
ParserTablePropertiesQuery.cpp
ParserTablePropertiesQuery.h
ParserTablesInSelectQuery.cpp Better highlighting of keywords 2024-04-28 00:19:42 +02:00
ParserTablesInSelectQuery.h Better highlighting of keywords 2024-04-28 00:19:42 +02:00
ParserTimeInterval.cpp
ParserTimeInterval.h
ParserTransactionControl.cpp
ParserTransactionControl.h
ParserUndropQuery.cpp
ParserUndropQuery.h
ParserUnionQueryElement.cpp
ParserUnionQueryElement.h
ParserUseQuery.cpp
ParserUseQuery.h
ParserViewTargets.cpp Move view targets to separate AST class "ASTViewTargets" 2024-07-16 14:33:13 +02:00
ParserViewTargets.h Add more comments. 2024-07-18 21:26:33 +02:00
ParserWatchQuery.cpp
ParserWatchQuery.h
ParserWithElement.cpp
ParserWithElement.h
queryNormalization.cpp Move StringUtils.h/cpp back to Common/ 2024-05-19 09:39:36 +00:00
queryNormalization.h
QueryParameterVisitor.cpp
QueryParameterVisitor.h
queryToString.cpp
queryToString.h Revert "Merge pull request #59122 from arthurpassos/bring_back_attach_partition_pr" 2024-02-07 02:52:43 +01:00
QueryWithOutputSettingsPushDownVisitor.cpp
QueryWithOutputSettingsPushDownVisitor.h
SelectUnionMode.cpp
SelectUnionMode.h Useless changes 2024-05-09 01:08:33 +02:00
StringRange.h
SyncReplicaMode.h
TablePropertiesQueriesASTs.h
TokenIterator.cpp Make TokenIterator lazy as it should be 2024-05-15 03:27:08 +02:00
TokenIterator.h Fix error 2024-06-17 04:57:16 +02:00
toOneLineQuery.cpp
toOneLineQuery.h