Skip to content

Commit b0b75f0

Browse files
committed
fixed small parser issue in ANTLR4
1 parent a747879 commit b0b75f0

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ To use it set `com.clickhouse.jdbc.DriverProperties#SQL_PARSER` to `ANTLR4`.
1818
- https://github.com/ClickHouse/clickhouse-java/issues/2572
1919
- https://github.com/ClickHouse/clickhouse-java/issues/2573
2020
- https://github.com/ClickHouse/clickhouse-java/issues/2609
21+
- https://github.com/ClickHouse/clickhouse-java/issues/2527
2122

2223
- [repo] New artifact `clickhouse-jdbc-all` added to address issue when maven package qualifiers may not be used.
2324
This artifact should is a copy of `clickhouse-jdbc:all` but should be used only when required. (https://github.com/ClickHouse/clickhouse-java/issues/2625)

jdbc-v2/src/main/antlr4/com/clickhouse/jdbc/internal/parser/antlr4/ClickHouseParser.g4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,7 @@ keyword
13691369
| SHOW
13701370
| SOURCE
13711371
| START
1372+
| STATISTICS
13721373
| STOP
13731374
| SUBSTRING
13741375
| SYNC
@@ -1439,6 +1440,8 @@ keywordForAlias
14391440
| MINUTE
14401441
| SECOND
14411442
| REVOKE
1443+
| URL
1444+
| STATISTICS
14421445
;
14431446

14441447
alias

jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/BaseSqlParserFacadeTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ public static Object[][] testStatementWithoutResultSetDP() {
581581
{"CREATE QUOTA qB FOR INTERVAL 30 minute MAX execution_time = 0.5, FOR INTERVAL 5 quarter MAX queries = 321, errors = 10 TO default", 0, false},
582582
{"CREATE SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 TO robin", 0, false},
583583
{"CREATE NAMED COLLECTION foobar AS a = '1', b = '2' OVERRIDABLE", 0, false},
584+
{"CREATE TABLE IF NOT EXISTS statistics.vast_event_v2 (ip UInt32, url String) ENGINE = ReplacingMergeTree()", 0, false},
585+
{"CREATE TABLE IF NOT EXISTS `statistics`.vast_event_v2 (ip UInt32, url String) ENGINE = ReplacingMergeTree()", 0, false},
584586
{"alter table t2 alter column v type Int32", 0, false},
585587
{"alter table t alter column j default 1", 0, false},
586588
{"ALTER TABLE t MODIFY COLUMN j default 1", 0, false},

0 commit comments

Comments
 (0)