mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Fix test
This commit is contained in:
parent
793b549291
commit
b8d5a82f97
@ -1,8 +1,4 @@
|
||||
BEFORE a_r1 x String
|
||||
BEFORE a_r1 y String MATERIALIZED \'str\'
|
||||
BEFORE a_r2 x String
|
||||
BEFORE a_r2 y String MATERIALIZED \'str\'
|
||||
AFTER a_r1 x String
|
||||
AFTER a_r1 y String
|
||||
AFTER a_r2 x String
|
||||
AFTER a_r2 y String
|
||||
BEFORE a x String
|
||||
BEFORE a y String MATERIALIZED \'str\'
|
||||
AFTER a x String
|
||||
AFTER a y String
|
||||
|
@ -1,14 +1,13 @@
|
||||
DROP TABLE IF EXISTS a_r1 SYNC;
|
||||
DROP TABLE IF EXISTS a_r2 SYNC;
|
||||
CREATE TABLE a_r1 (x String, y String MATERIALIZED 'str') ENGINE = ReplicatedMergeTree('/clickhouse/{database}/a', 'r1') ORDER BY x;
|
||||
CREATE TABLE a_r2 (x String, y String MATERIALIZED 'str') ENGINE = ReplicatedMergeTree('/clickhouse/{database}/a', 'r2') ORDER BY x;
|
||||
DROP TABLE IF EXISTS a SYNC;
|
||||
CREATE TABLE a (x String, y String MATERIALIZED 'str') ENGINE = ReplicatedMergeTree('/clickhouse/{database}/a', 'r1') ORDER BY x;
|
||||
|
||||
INSERT INTO a_r1 SELECT toString(number) FROM numbers(100);
|
||||
SELECT 'BEFORE', table, name, type, default_kind, default_expression FROM system.columns WHERE database = currentDatabase() AND table LIKE 'a\_r%' ORDER BY table, name;
|
||||
INSERT INTO a SELECT toString(number) FROM numbers(100);
|
||||
SELECT 'BEFORE', table, name, type, default_kind, default_expression FROM system.columns WHERE database = currentDatabase() AND table = 'a' ORDER BY table, name;
|
||||
|
||||
ALTER TABLE a_r1
|
||||
ADD INDEX IF NOT EXISTS some_index x TYPE set(16) GRANULARITY 1,
|
||||
-- DROP INDEX is important to make the mutation not a pure metadata mutation
|
||||
ALTER TABLE a
|
||||
DROP INDEX IF EXISTS some_index,
|
||||
MODIFY COLUMN y REMOVE MATERIALIZED
|
||||
SETTINGS alter_sync = 2, mutations_sync = 2;
|
||||
|
||||
SELECT 'AFTER', table, name, type, default_kind, default_expression FROM system.columns WHERE database = currentDatabase() AND table LIKE 'a\_r%' ORDER BY table, name;
|
||||
SELECT 'AFTER', table, name, type, default_kind, default_expression FROM system.columns WHERE database = currentDatabase() AND table = 'a' ORDER BY table, name;
|
||||
|
Loading…
Reference in New Issue
Block a user