-
Notifications
You must be signed in to change notification settings - Fork 47
Add support of parsing Tuple type in DDL #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+2,451
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,48 @@ | ||
| CREATE TABLE IF NOT EXISTS test.db ON CLUSTER default_cluster | ||
| ( | ||
| `f0` Array(Tuple( | ||
| f00 DateTime64(9, 'UTC'), | ||
| f01 String, | ||
| f02 Map(String, String), | ||
| f03 Map(String, Float64), | ||
| f04 Map(String, BOOL))) CODEC(ZSTD(1) | ||
| ), | ||
| `f1` UInt64 CODEC(Delta(8), LZ4), | ||
| `f2` FixedString(16) CODEC(LZ4), | ||
| `f3` FixedString(8) CODEC(LZ4), | ||
| `f4` FixedString(8) CODEC(LZ4), | ||
| `f6` DateTime64(9, 'UTC') CODEC(Delta(8), LZ4), | ||
| `f6` UInt64 CODEC(Delta(8), LZ4), | ||
| `f7` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f8` String CODEC(ZSTD(1)), | ||
| `f9` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f10` String CODEC(ZSTD(1)), | ||
| `f11` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f12` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f13` String CODEC(ZSTD(1)), | ||
| `f14` Map(LowCardinality(String), String) CODEC(ZSTD(1)), | ||
| `f15` Map(LowCardinality(String), String) CODEC(ZSTD(1)), | ||
| `f16` Map(LowCardinality(String), Float64) CODEC(ZSTD(1)), | ||
| `f17` Map(LowCardinality(String), BOOL) CODEC(ZSTD(1)), | ||
| `f18` Array(Tuple( | ||
| f180 FixedString(16), | ||
| f181 FixedString(8), | ||
| f182 String, | ||
| f183 Map(String, String))) CODEC(ZSTD(1)), | ||
| `f184` String CODEC(ZSTD(1)), | ||
| `f185` String CODEC(ZSTD(1)), | ||
| `f186` String CODEC(ZSTD(1)), | ||
| `f187` UInt32 CODEC(ZSTD(1)), | ||
| `f188` DATETIME DEFAULT now(), | ||
| INDEX idx_0 f0 TYPE bloom_filter(0.001) GRANULARITY 1, | ||
| INDEX idx_f1 f1 TYPE bloom_filter(0.001) GRANULARITY 1, | ||
| INDEX idx_f2 f2 TYPE minmax GRANULARITY 1, | ||
| INDEX idx_f3 f3 TYPE set(0) GRANULARITY 4, | ||
| INDEX idx_f4 mapValues(f4) TYPE bloom_filter(0.01) GRANULARITY 1, | ||
| INDEX idx_f5 name TYPE tokenbf_v1(4096, 3, 0) GRANULARITY 4 | ||
| ) | ||
| ENGINE = MergeTree | ||
| PARTITION BY toDate(timestamp) | ||
| ORDER BY (ts_bucket, service_name, name, toUnixTimestamp64Nano(timestamp)) | ||
| TTL toDate(timestamp) + toIntervalDay(15) | ||
| SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1 |
This file contains hidden or 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,52 @@ | ||
| -- Origin SQL: | ||
| CREATE TABLE IF NOT EXISTS test.db ON CLUSTER default_cluster | ||
| ( | ||
| `f0` Array(Tuple( | ||
| f00 DateTime64(9, 'UTC'), | ||
| f01 String, | ||
| f02 Map(String, String), | ||
| f03 Map(String, Float64), | ||
| f04 Map(String, BOOL))) CODEC(ZSTD(1) | ||
| ), | ||
| `f1` UInt64 CODEC(Delta(8), LZ4), | ||
| `f2` FixedString(16) CODEC(LZ4), | ||
| `f3` FixedString(8) CODEC(LZ4), | ||
| `f4` FixedString(8) CODEC(LZ4), | ||
| `f6` DateTime64(9, 'UTC') CODEC(Delta(8), LZ4), | ||
| `f6` UInt64 CODEC(Delta(8), LZ4), | ||
| `f7` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f8` String CODEC(ZSTD(1)), | ||
| `f9` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f10` String CODEC(ZSTD(1)), | ||
| `f11` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f12` LowCardinality(String) CODEC(ZSTD(1)), | ||
| `f13` String CODEC(ZSTD(1)), | ||
| `f14` Map(LowCardinality(String), String) CODEC(ZSTD(1)), | ||
| `f15` Map(LowCardinality(String), String) CODEC(ZSTD(1)), | ||
| `f16` Map(LowCardinality(String), Float64) CODEC(ZSTD(1)), | ||
| `f17` Map(LowCardinality(String), BOOL) CODEC(ZSTD(1)), | ||
| `f18` Array(Tuple( | ||
| f180 FixedString(16), | ||
| f181 FixedString(8), | ||
| f182 String, | ||
| f183 Map(String, String))) CODEC(ZSTD(1)), | ||
| `f184` String CODEC(ZSTD(1)), | ||
| `f185` String CODEC(ZSTD(1)), | ||
| `f186` String CODEC(ZSTD(1)), | ||
| `f187` UInt32 CODEC(ZSTD(1)), | ||
| `f188` DATETIME DEFAULT now(), | ||
| INDEX idx_0 f0 TYPE bloom_filter(0.001) GRANULARITY 1, | ||
| INDEX idx_f1 f1 TYPE bloom_filter(0.001) GRANULARITY 1, | ||
| INDEX idx_f2 f2 TYPE minmax GRANULARITY 1, | ||
| INDEX idx_f3 f3 TYPE set(0) GRANULARITY 4, | ||
| INDEX idx_f4 mapValues(f4) TYPE bloom_filter(0.01) GRANULARITY 1, | ||
| INDEX idx_f5 name TYPE tokenbf_v1(4096, 3, 0) GRANULARITY 4 | ||
| ) | ||
| ENGINE = MergeTree | ||
| PARTITION BY toDate(timestamp) | ||
| ORDER BY (ts_bucket, service_name, name, toUnixTimestamp64Nano(timestamp)) | ||
| TTL toDate(timestamp) + toIntervalDay(15) | ||
| SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1 | ||
|
|
||
| -- Format SQL: | ||
| CREATE TABLE IF NOT EXISTS test.db ON CLUSTER default_cluster (`f0` Array(Tuple(f00 DateTime64(9, 'UTC'), f01 String, f02 Map(String, String), f03 Map(String, Float64), f04 Map(String, BOOL))) CODEC(ZSTD(1)), `f1` UInt64 CODEC(Delta(8), LZ4), `f2` FixedString(16) CODEC(LZ4), `f3` FixedString(8) CODEC(LZ4), `f4` FixedString(8) CODEC(LZ4), `f6` DateTime64(9, 'UTC') CODEC(Delta(8), LZ4), `f6` UInt64 CODEC(Delta(8), LZ4), `f7` LowCardinality(String) CODEC(ZSTD(1)), `f8` String CODEC(ZSTD(1)), `f9` LowCardinality(String) CODEC(ZSTD(1)), `f10` String CODEC(ZSTD(1)), `f11` LowCardinality(String) CODEC(ZSTD(1)), `f12` LowCardinality(String) CODEC(ZSTD(1)), `f13` String CODEC(ZSTD(1)), `f14` Map(LowCardinality(String), String) CODEC(ZSTD(1)), `f15` Map(LowCardinality(String), String) CODEC(ZSTD(1)), `f16` Map(LowCardinality(String), Float64) CODEC(ZSTD(1)), `f17` Map(LowCardinality(String), BOOL) CODEC(ZSTD(1)), `f18` Array(Tuple(f180 FixedString(16), f181 FixedString(8), f182 String, f183 Map(String, String))) CODEC(ZSTD(1)), `f184` String CODEC(ZSTD(1)), `f185` String CODEC(ZSTD(1)), `f186` String CODEC(ZSTD(1)), `f187` UInt32 CODEC(ZSTD(1)), `f188` DATETIME DEFAULT now(), INDEX idx_0 f0 TYPE bloom_filter(0.001) GRANULARITY 1, INDEX idx_f1 f1 TYPE bloom_filter(0.001) GRANULARITY 1, INDEX idx_f2 f2 TYPE minmax GRANULARITY 1, INDEX idx_f3 f3 TYPE set(0) GRANULARITY 4, INDEX idx_f4 mapValues(f4) TYPE bloom_filter(0.01) GRANULARITY 1, INDEX idx_f5 name TYPE tokenbf_v1(4096, 3, 0) GRANULARITY 4) ENGINE = MergeTree ORDER BY (ts_bucket, service_name, name, toUnixTimestamp64Nano(timestamp)) PARTITION BY toDate(timestamp) TTL toDate(timestamp) + toIntervalDay(15) SETTINGS index_granularity=8192, ttl_only_drop_parts=1; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.