mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
30 lines
883 B
SQL
30 lines
883 B
SQL
DROP TABLE IF EXISTS mutation_table;
|
|
|
|
CREATE TABLE mutation_table
|
|
(
|
|
date Date,
|
|
key UInt64,
|
|
value String
|
|
)
|
|
ENGINE = MergeTree()
|
|
PARTITION BY date
|
|
ORDER BY tuple();
|
|
|
|
INSERT INTO mutation_table SELECT toDate('2019-10-01'), number, '42' FROM numbers(100);
|
|
|
|
INSERT INTO mutation_table SELECT toDate('2019-10-02'), number, 'Hello' FROM numbers(100);
|
|
|
|
SELECT distinct(value) FROM mutation_table ORDER BY value;
|
|
|
|
ALTER TABLE mutation_table MODIFY COLUMN value UInt64 SETTINGS mutations_sync = 2; --{serverError UNFINISHED}
|
|
|
|
SELECT distinct(value) FROM mutation_table ORDER BY value; --{serverError CANNOT_PARSE_TEXT}
|
|
|
|
KILL MUTATION where table = 'mutation_table' and database = currentDatabase();
|
|
|
|
ALTER TABLE mutation_table MODIFY COLUMN value String SETTINGS mutations_sync = 2;
|
|
|
|
SELECT distinct(value) FROM mutation_table ORDER BY value;
|
|
|
|
DROP TABLE IF EXISTS mutation_table;
|