mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Added test for Array columns in primary key [#METR-20079].
This commit is contained in:
parent
d391e77b7d
commit
13e737bdd6
@ -0,0 +1,12 @@
|
||||
[1,2,3] Hello, world! 1
|
||||
[1,2] Hello 2
|
||||
[2] Goodbye 3
|
||||
[] abc 4
|
||||
[2,3,4] def 5
|
||||
[5,6] ghi 6
|
||||
[1,2,3] Hello, world! 1
|
||||
[1,2] Hello 2
|
||||
[2] Goodbye 3
|
||||
[] abc 4
|
||||
[2,3,4] def 5
|
||||
[5,6] ghi 6
|
18
dbms/tests/queries/0_stateless/00311_array_primary_key.sql
Normal file
18
dbms/tests/queries/0_stateless/00311_array_primary_key.sql
Normal file
@ -0,0 +1,18 @@
|
||||
DROP TABLE IF EXISTS test.array_pk;
|
||||
CREATE TABLE test.array_pk (key Array(UInt8), s String, n UInt64, d Date MATERIALIZED '2000-01-01') ENGINE = MergeTree(d, (key, s, n), 1);
|
||||
|
||||
INSERT INTO test.array_pk VALUES ([1, 2, 3], 'Hello, world!', 1);
|
||||
INSERT INTO test.array_pk VALUES ([1, 2], 'Hello', 2);
|
||||
INSERT INTO test.array_pk VALUES ([2], 'Goodbye', 3);
|
||||
INSERT INTO test.array_pk VALUES ([], 'abc', 4);
|
||||
INSERT INTO test.array_pk VALUES ([2, 3, 4], 'def', 5);
|
||||
INSERT INTO test.array_pk VALUES ([5, 6], 'ghi', 6);
|
||||
|
||||
SELECT * FROM test.array_pk ORDER BY n;
|
||||
|
||||
DETACH TABLE test.array_pk;
|
||||
ATTACH TABLE test.array_pk (key Array(UInt8), s String, n UInt64, d Date MATERIALIZED '2000-01-01') ENGINE = MergeTree(d, (key, s, n), 1);
|
||||
|
||||
SELECT * FROM test.array_pk ORDER BY n;
|
||||
|
||||
DROP TABLE test.array_pk;
|
Loading…
Reference in New Issue
Block a user