Skip to content

Commit 7c4f798

Browse files
committed
Finish getting the tests together
1 parent be7a20d commit 7c4f798

File tree

2 files changed

+132
-56
lines changed

2 files changed

+132
-56
lines changed

src/languages/clickhouse/clickhouse.formatter.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ const reservedClauses = expandPhrases([
5454
'ALTER [ROW] POLICY [IF EXISTS]',
5555
// https://clickhouse.com/docs/sql-reference/statements/drop
5656
'DROP {USER | ROLE | QUOTA | PROFILE | SETTINGS PROFILE | ROW POLICY | POLICY} [IF EXISTS]',
57-
'DROP [TEMPORARY] TABLE [IF EXISTS] [IF EMPTY]',
5857
]);
5958

6059
const standardOnelineClauses = expandPhrases([
@@ -63,7 +62,7 @@ const standardOnelineClauses = expandPhrases([
6362
]);
6463
const tabularOnelineClauses = expandPhrases([
6564
'ALL EXCEPT',
66-
// 'ON CLUSTER',
65+
'ON CLUSTER',
6766
// https://clickhouse.com/docs/sql-reference/statements/update
6867
'UPDATE',
6968
// https://clickhouse.com/docs/sql-reference/statements/system
@@ -99,6 +98,9 @@ const tabularOnelineClauses = expandPhrases([
9998
'SYNC',
10099
// https://clickhouse.com/docs/sql-reference/statements/drop
101100
'DROP {DICTIONARY | DATABASE | PROFILE | VIEW | FUNCTION | NAMED COLLECTION} [IF EXISTS]',
101+
'DROP [TEMPORARY] TABLE [IF EXISTS] [IF EMPTY]',
102+
// https://clickhouse.com/docs/sql-reference/statements/alter/table#rename
103+
'RENAME TO',
102104
// https://clickhouse.com/docs/sql-reference/statements/exists
103105
'EXISTS [TEMPORARY] {TABLE | DICTIONARY | DATABASE}',
104106
// https://clickhouse.com/docs/sql-reference/statements/kill
@@ -228,7 +230,6 @@ const reservedJoins = expandPhrases([
228230
const reservedKeywordPhrases = expandPhrases([
229231
'{ROWS | RANGE} BETWEEN',
230232
'ALTER MATERIALIZE STATISTICS',
231-
'RENAME TO',
232233
]);
233234

234235
// https://clickhouse.com/docs/sql-reference/syntax

0 commit comments

Comments
 (0)