mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
10c7a6c45e
* Add ability to specify DefaultCompression codec which correspond to settings specified in config.xml * Fix style * Rename DefaultCompression to simple Default * Fix compression codec * Better codec description representation * Less strange code and one method * Fix delta
30 lines
662 B
SQL
30 lines
662 B
SQL
DROP TABLE IF EXISTS compress_table;
|
|
|
|
CREATE TABLE compress_table
|
|
(
|
|
key UInt64,
|
|
value1 String CODEC(Default),
|
|
value2 UInt64 CODEC(Delta, Default),
|
|
value3 String CODEC(ZSTD(10))
|
|
)
|
|
ENGINE = MergeTree()
|
|
ORDER BY key;
|
|
|
|
INSERT INTO compress_table VALUES(1, '1', '1', '1');
|
|
|
|
SELECT * FROM compress_table;
|
|
|
|
ALTER TABLE compress_table MODIFY COLUMN value3 CODEC(Default);
|
|
|
|
INSERT INTO compress_table VALUES(2, '2', '2', '2');
|
|
|
|
SELECT * FROM compress_table ORDER BY key;
|
|
|
|
DESCRIBE TABLE compress_table;
|
|
|
|
SHOW CREATE TABLE compress_table;
|
|
|
|
ALTER TABLE compress_table MODIFY COLUMN value2 CODEC(Default(5)); --{serverError 36}
|
|
|
|
DROP TABLE IF EXISTS compress_table;
|