mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 12:14:18 +00:00
Add a test
This commit is contained in:
parent
f71ec041e7
commit
f3e9403e5c
@ -0,0 +1,45 @@
|
||||
1 1 11
|
||||
1 2 12
|
||||
Row 1:
|
||||
──────
|
||||
event_type: MergePartsStart
|
||||
merge_reason: RegularMerge
|
||||
table: test
|
||||
part_name: 1_1_2_1
|
||||
partition_id: 1
|
||||
partition: 1
|
||||
rows: 0
|
||||
merged_from: ['1_1_1_0','1_2_2_0']
|
||||
|
||||
Row 2:
|
||||
──────
|
||||
event_type: MergeParts
|
||||
merge_reason: RegularMerge
|
||||
table: test
|
||||
part_name: 1_1_2_1
|
||||
partition_id: 1
|
||||
partition: 1
|
||||
rows: 2
|
||||
merged_from: ['1_1_1_0','1_2_2_0']
|
||||
|
||||
Row 3:
|
||||
──────
|
||||
event_type: MutatePartStart
|
||||
merge_reason: NotAMerge
|
||||
table: test
|
||||
part_name: 1_1_2_1_4
|
||||
partition_id: 1
|
||||
partition: 1
|
||||
rows: 0
|
||||
merged_from: ['1_1_2_1']
|
||||
|
||||
Row 4:
|
||||
──────
|
||||
event_type: MutatePart
|
||||
merge_reason: NotAMerge
|
||||
table: test
|
||||
part_name: 1_1_2_1_4
|
||||
partition_id: 1
|
||||
partition: 1
|
||||
rows: 2
|
||||
merged_from: ['1_1_2_1']
|
@ -0,0 +1,17 @@
|
||||
DROP TABLE IF EXISTS test;
|
||||
CREATE TABLE test (x UInt8, y UInt8, z String DEFAULT toString(x)) PARTITION BY x ORDER BY x;
|
||||
INSERT INTO test (x, y) VALUES (1, 1);
|
||||
INSERT INTO test (x, y) VALUES (1, 2);
|
||||
OPTIMIZE TABLE test FINAL;
|
||||
INSERT INTO test (x, y) VALUES (2, 1);
|
||||
ALTER TABLE test DROP PARTITION 2;
|
||||
SET mutations_sync = 1;
|
||||
ALTER TABLE test UPDATE z = x || y WHERE 1;
|
||||
SELECT * FROM test ORDER BY ALL;
|
||||
TRUNCATE TABLE test;
|
||||
DROP TABLE test SYNC;
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
SELECT event_type, merge_reason, table, part_name, partition_id, partition, rows, merged_from
|
||||
FROM system.part_log WHERE database = currentDatabase() AND event_type IN ('MergePartsStart', 'MergeParts', 'MutatePartStart', 'MutatePart')
|
||||
ORDER BY event_time_microseconds FORMAT Vertical;
|
Loading…
Reference in New Issue
Block a user