-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handling Codec(Delta, ZSTD(1)) (#73)
- Loading branch information
1 parent
61b3867
commit fa2bec7
Showing
7 changed files
with
588 additions
and
2 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,12 @@ | ||
CREATE TABLE IF NOT EXISTS test_local | ||
( | ||
`id` UInt64 CODEC(Delta, ZSTD(1)), | ||
`api_id` UInt64 CODEC(ZSTD(1)), | ||
`timestamp` DateTime64(9) CODEC(ZSTD(1)), | ||
INDEX timestamp_index(timestamp) TYPE minmax GRANULARITY 4 | ||
) | ||
ENGINE = ReplicatedMergeTree('/root/test_local', '{replica}') | ||
PARTITION BY toStartOfHour(`timestamp`) | ||
ORDER BY (toUnixTimestamp64Nano(`timestamp`), `api_id`) | ||
TTL toStartOfHour(`timestamp`) + INTERVAL 7 DAY,toStartOfHour(`timestamp`) + INTERVAL 2 DAY | ||
SETTINGS execute_merges_on_single_replica_time_threshold=1200, index_granularity=16384, max_bytes_to_merge_at_max_space_in_pool=64424509440, storage_policy='main', ttl_only_drop_parts=1; |
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
28 changes: 28 additions & 0 deletions
28
parser/testdata/ddl/format/create_table_with_codec_delta.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,28 @@ | ||
-- Origin SQL: | ||
CREATE TABLE IF NOT EXISTS test_local | ||
( | ||
`id` UInt64 CODEC(Delta, ZSTD(1)), | ||
`api_id` UInt64 CODEC(ZSTD(1)), | ||
`timestamp` DateTime64(9) CODEC(ZSTD(1)), | ||
INDEX timestamp_index(timestamp) TYPE minmax GRANULARITY 4 | ||
) | ||
ENGINE = ReplicatedMergeTree('/root/test_local', '{replica}') | ||
PARTITION BY toStartOfHour(`timestamp`) | ||
ORDER BY (toUnixTimestamp64Nano(`timestamp`), `api_id`) | ||
TTL toStartOfHour(`timestamp`) + INTERVAL 7 DAY,toStartOfHour(`timestamp`) + INTERVAL 2 DAY | ||
SETTINGS execute_merges_on_single_replica_time_threshold=1200, index_granularity=16384, max_bytes_to_merge_at_max_space_in_pool=64424509440, storage_policy='main', ttl_only_drop_parts=1; | ||
|
||
|
||
-- Format SQL: | ||
CREATE TABLE IF NOT EXISTS test_local | ||
( | ||
`id` UInt64 CODEC(Delta, ZSTD(1)), | ||
`api_id` UInt64 CODEC(ZSTD(1)), | ||
`timestamp` DateTime64(9) CODEC(ZSTD(1)), | ||
INDEX timestamp_index(timestamp) TYPE minmax GRANULARITY 4 | ||
) | ||
ENGINE = ReplicatedMergeTree('/root/test_local', '{replica}') | ||
PARTITION BY toStartOfHour(`timestamp`) | ||
TTL toStartOfHour(`timestamp`) + INTERVAL 7 DAY,toStartOfHour(`timestamp`) + INTERVAL 2 DAY | ||
SETTINGS execute_merges_on_single_replica_time_threshold=1200, index_granularity=16384, max_bytes_to_merge_at_max_space_in_pool=64424509440, storage_policy='main', ttl_only_drop_parts=1 | ||
ORDER BY (toUnixTimestamp64Nano(`timestamp`), `api_id`); |
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
Oops, something went wrong.