mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Updated tests
This commit is contained in:
parent
dbdc018ab8
commit
f01a566646
@ -24,10 +24,13 @@ ORDER BY (pk, sk);
|
||||
-- ERROR cases
|
||||
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY pk, sk, val, mat, alias; -- { serverError 16 } -- alias column is present
|
||||
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY sk, val; -- { serverError 8 } -- primary key column is missing
|
||||
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY; -- { serverError 51 } -- list is empty
|
||||
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY * EXCEPT(pk, sk, val, mat, alias); -- { serverError 51 } -- list is empty
|
||||
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY * EXCEPT(pk); -- { serverError 8 } -- primary key column is missing
|
||||
|
||||
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY; -- { clientError 62 } -- empty list is a syntax error
|
||||
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk,sk,val,mat EXCEPT mat; -- { clientError 62 } -- invalid syntax
|
||||
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk APPLY(pk+1); -- { clientError 62 } -- APPLY column transformer is not supported
|
||||
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk REPLACE(pk+1); -- { clientError 62 } -- REPLACE column transformer is not supported
|
||||
|
||||
-- Valid cases
|
||||
-- NOTE: here and below we need FINAL to force deduplication in such a small set of data in only 1 part.
|
||||
|
@ -7,14 +7,14 @@ r1 3 1003 2 2 2
|
||||
r1 4 1004 2 2 2
|
||||
r1 5 2005 2 1 1
|
||||
r1 9 1002 1 1 1
|
||||
r1 1 1001 2 1 1
|
||||
r1 1 2001 1 1 1
|
||||
r1 2 1002 1 1 1
|
||||
r1 2 2002 1 1 1
|
||||
r1 3 1003 2 2 2
|
||||
r1 4 1004 2 2 2
|
||||
r1 5 2005 2 1 1
|
||||
r1 9 1002 1 1 1
|
||||
r2 1 1001 2 1 1
|
||||
r2 1 2001 1 1 1
|
||||
r2 2 1002 1 1 1
|
||||
r2 2 2002 1 1 1
|
||||
r2 3 1003 2 2 2
|
||||
r2 4 1004 2 2 2
|
||||
r2 5 2005 2 1 1
|
||||
r2 9 1002 1 1 1
|
||||
after old OPTIMIZE DEDUPLICATE
|
||||
r1 1 1001 1 1 1
|
||||
r1 1 2001 1 1 1
|
||||
|
@ -28,7 +28,7 @@ SYSTEM SYNC REPLICA replicated_deduplicate_by_columns_r1;
|
||||
|
||||
SELECT 'check that we have a data';
|
||||
SELECT 'r1', id, val, count(), uniqExact(insert_time_ns), uniqExact(insert_replica_id) FROM replicated_deduplicate_by_columns_r1 GROUP BY id, val ORDER BY id, val;
|
||||
SELECT 'r1', id, val, count(), uniqExact(insert_time_ns), uniqExact(insert_replica_id) FROM replicated_deduplicate_by_columns_r2 GROUP BY id, val ORDER BY id, val;
|
||||
SELECT 'r2', id, val, count(), uniqExact(insert_time_ns), uniqExact(insert_replica_id) FROM replicated_deduplicate_by_columns_r2 GROUP BY id, val ORDER BY id, val;
|
||||
|
||||
-- NOTE: here and below we need FINAL to force deduplication in such a small set of data in only 1 part.
|
||||
-- that should remove full duplicates
|
||||
|
Loading…
Reference in New Issue
Block a user