-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrongly parsed the Enum type with values (#109)
- Loading branch information
Showing
5 changed files
with
507 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TABLE t0 on cluster default_cluster | ||
( | ||
`method` Enum8('GET'=1 , 'POST'=2, 'HEAD'=3, 'PUT'=4,'PATCH'=5, 'DELETE'=6, 'CONNECT'=7, 'OPTIONS'=8, 'TRACE'=9) CODEC(ZSTD(1)), | ||
`timestamp` DateTime64(3) CODEC(DoubleDelta, ZSTD) | ||
) | ||
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{layer}-{shard}', '{replica}') | ||
PARTITION BY toDate(timestamp) | ||
ORDER BY (method,timestamp) | ||
TTL toDate(timestamp) + toIntervalDay(3) | ||
SETTINGS index_granularity = 8192; |
14 changes: 14 additions & 0 deletions
14
parser/testdata/ddl/format/create_table_with_enum_fields.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- Origin SQL: | ||
CREATE TABLE t0 on cluster default_cluster | ||
( | ||
`method` Enum8('GET'=1 , 'POST'=2, 'HEAD'=3, 'PUT'=4,'PATCH'=5, 'DELETE'=6, 'CONNECT'=7, 'OPTIONS'=8, 'TRACE'=9) CODEC(ZSTD(1)), | ||
`timestamp` DateTime64(3) CODEC(DoubleDelta, ZSTD) | ||
) | ||
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{layer}-{shard}', '{replica}') | ||
PARTITION BY toDate(timestamp) | ||
ORDER BY (method,timestamp) | ||
TTL toDate(timestamp) + toIntervalDay(3) | ||
SETTINGS index_granularity = 8192; | ||
|
||
-- Format SQL: | ||
CREATE TABLE t0 ON CLUSTER default_cluster (`method` Enum8('GET'=1, 'POST'=2, 'HEAD'=3, 'PUT'=4, 'PATCH'=5, 'DELETE'=6, 'CONNECT'=7, 'OPTIONS'=8, 'TRACE'=9) CODEC(ZSTD(1)), `timestamp` DateTime64(3) CODEC(DoubleDelta, ZSTD)) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{layer}-{shard}', '{replica}') PARTITION BY toDate(timestamp) TTL toDate(timestamp) + toIntervalDay(3) SETTINGS index_granularity=8192 ORDER BY (method, timestamp); |
Oops, something went wrong.