mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added a test for #2219
This commit is contained in:
parent
9d0004cba0
commit
848e4a0541
@ -0,0 +1 @@
|
||||
Hello 1
|
@ -0,0 +1,32 @@
|
||||
DROP TABLE IF EXISTS test_table;
|
||||
DROP TABLE IF EXISTS test_table_sharded;
|
||||
|
||||
create table
|
||||
test_table_sharded(
|
||||
date Date,
|
||||
text String,
|
||||
hash UInt64
|
||||
)
|
||||
engine=MergeTree(date, (hash, date), 8192);
|
||||
|
||||
create table test_table as test_table_sharded
|
||||
engine=Distributed(test_cluster_two_shards, currentDatabase(), test_table_sharded, hash);
|
||||
|
||||
SET distributed_product_mode = 'local';
|
||||
SET insert_distributed_sync = 1;
|
||||
|
||||
INSERT INTO test_table VALUES ('2020-04-20', 'Hello', 123);
|
||||
|
||||
SELECT
|
||||
text,
|
||||
uniqExactIf(hash, hash IN (
|
||||
SELECT DISTINCT
|
||||
hash
|
||||
FROM test_table AS t1
|
||||
)) as counter
|
||||
FROM test_table AS t2
|
||||
GROUP BY text
|
||||
ORDER BY counter, text;
|
||||
|
||||
DROP TABLE test_table;
|
||||
DROP TABLE test_table_sharded;
|
Loading…
Reference in New Issue
Block a user