mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Update tests
This commit is contained in:
parent
ee502ef6b9
commit
2ce4f543d6
1
programs/server/config.d/graphite_alternative.xml
Symbolic link
1
programs/server/config.d/graphite_alternative.xml
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tests/config/config.d/graphite_alternative.xml
|
@ -3,5 +3,7 @@
|
||||
2018-01-01 2 2
|
||||
2018-01-01 2 2
|
||||
== (Replicas) Test optimize ==
|
||||
d1 2 1
|
||||
d2 1 0
|
||||
d3 2 1
|
||||
d4 1 0
|
||||
|
@ -14,7 +14,7 @@ drop table tab_00577;
|
||||
|
||||
DROP TABLE IF EXISTS testCleanupR1;
|
||||
CREATE TABLE testCleanupR1 (uid String, version UInt32, is_deleted UInt8)
|
||||
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/{database}/tables/test_cleanup/', 'r1', version, is_deleted)
|
||||
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/{database}/tables/test_cleanup/', 'r1', version)
|
||||
ORDER BY uid SETTINGS enable_vertical_merge_algorithm = 1, vertical_merge_algorithm_min_rows_to_activate = 0, vertical_merge_algorithm_min_columns_to_activate = 0, min_rows_for_wide_part = 0,
|
||||
min_bytes_for_wide_part = 0;
|
||||
INSERT INTO testCleanupR1 (*) VALUES ('d1', 1, 0),('d2', 1, 0),('d3', 1, 0),('d4', 1, 0);
|
||||
|
@ -1,31 +0,0 @@
|
||||
--- Based on https://github.com/ClickHouse/ClickHouse/issues/49685
|
||||
--- Verify that ReplacingMergeTree properly handles _is_deleted:
|
||||
--- SELECT FINAL should take `_is_deleted` into consideration when there is only one partition.
|
||||
-- { echoOn }
|
||||
|
||||
DROP TABLE IF EXISTS t;
|
||||
CREATE TABLE t
|
||||
(
|
||||
`account_id` UInt64,
|
||||
`_is_deleted` UInt8,
|
||||
`_version` UInt64
|
||||
)
|
||||
ENGINE = ReplacingMergeTree(_version, _is_deleted)
|
||||
ORDER BY (account_id);
|
||||
INSERT INTO t SELECT number, 0, 1 FROM numbers(1e3);
|
||||
-- Mark the first 100 rows as deleted.
|
||||
INSERT INTO t SELECT number, 1, 1 FROM numbers(1e2);
|
||||
-- Put everything in one partition
|
||||
OPTIMIZE TABLE t FINAL;
|
||||
SELECT count() FROM t;
|
||||
1000
|
||||
SELECT count() FROM t FINAL;
|
||||
900
|
||||
-- Both should produce the same number of rows.
|
||||
-- Previously, `do_not_merge_across_partitions_select_final = 1` showed more rows,
|
||||
-- as if no rows were deleted.
|
||||
SELECT count() FROM t FINAL SETTINGS do_not_merge_across_partitions_select_final = 1;
|
||||
900
|
||||
SELECT count() FROM t FINAL SETTINGS do_not_merge_across_partitions_select_final = 0;
|
||||
900
|
||||
DROP TABLE t;
|
@ -1,32 +0,0 @@
|
||||
--- Based on https://github.com/ClickHouse/ClickHouse/issues/49685
|
||||
--- Verify that ReplacingMergeTree properly handles _is_deleted:
|
||||
--- SELECT FINAL should take `_is_deleted` into consideration when there is only one partition.
|
||||
-- { echoOn }
|
||||
|
||||
DROP TABLE IF EXISTS t;
|
||||
CREATE TABLE t
|
||||
(
|
||||
`account_id` UInt64,
|
||||
`_is_deleted` UInt8,
|
||||
`_version` UInt64
|
||||
)
|
||||
ENGINE = ReplacingMergeTree(_version, _is_deleted)
|
||||
ORDER BY (account_id);
|
||||
|
||||
INSERT INTO t SELECT number, 0, 1 FROM numbers(1e3);
|
||||
-- Mark the first 100 rows as deleted.
|
||||
INSERT INTO t SELECT number, 1, 1 FROM numbers(1e2);
|
||||
|
||||
-- Put everything in one partition
|
||||
OPTIMIZE TABLE t FINAL;
|
||||
|
||||
SELECT count() FROM t;
|
||||
SELECT count() FROM t FINAL;
|
||||
|
||||
-- Both should produce the same number of rows.
|
||||
-- Previously, `do_not_merge_across_partitions_select_final = 1` showed more rows,
|
||||
-- as if no rows were deleted.
|
||||
SELECT count() FROM t FINAL SETTINGS do_not_merge_across_partitions_select_final = 1;
|
||||
SELECT count() FROM t FINAL SETTINGS do_not_merge_across_partitions_select_final = 0;
|
||||
|
||||
DROP TABLE t;
|
@ -17,26 +17,6 @@ CREATE TABLE t_r
|
||||
ENGINE = ReplicatedReplacingMergeTree('/tables/{database}/t/', 'r2')
|
||||
ORDER BY id; -- { serverError METADATA_MISMATCH }
|
||||
|
||||
CREATE TABLE t2
|
||||
(
|
||||
`id` UInt64,
|
||||
`val` String,
|
||||
`legacy_ver` UInt64,
|
||||
`deleted` UInt8
|
||||
)
|
||||
ENGINE = ReplicatedReplacingMergeTree('/tables/{database}/t2/', 'r1', legacy_ver)
|
||||
ORDER BY id;
|
||||
|
||||
CREATE TABLE t2_r
|
||||
(
|
||||
`id` UInt64,
|
||||
`val` String,
|
||||
`legacy_ver` UInt64,
|
||||
`deleted` UInt8
|
||||
)
|
||||
ENGINE = ReplicatedReplacingMergeTree('/tables/{database}/t2/', 'r2', legacy_ver, deleted)
|
||||
ORDER BY id; -- { serverError METADATA_MISMATCH }
|
||||
|
||||
CREATE TABLE t3
|
||||
(
|
||||
`key` UInt64,
|
||||
|
Loading…
Reference in New Issue
Block a user