mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added a test from Silviu Caragea #2113
This commit is contained in:
parent
30dd11f8ca
commit
65ad97452b
6
dbms/tests/queries/0_stateless/00617_array_in.reference
Normal file
6
dbms/tests/queries/0_stateless/00617_array_in.reference
Normal file
@ -0,0 +1,6 @@
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
1
|
||||
2
|
17
dbms/tests/queries/0_stateless/00617_array_in.sql
Normal file
17
dbms/tests/queries/0_stateless/00617_array_in.sql
Normal file
@ -0,0 +1,17 @@
|
||||
USE test;
|
||||
|
||||
DROP TABLE IF EXISTS test_array_ops;
|
||||
CREATE TABLE test_array_ops(arr Array(Nullable(Int64))) ENGINE = Memory;
|
||||
|
||||
INSERT INTO test_array_ops(arr) values ([null, 10, -20]);
|
||||
INSERT INTO test_array_ops(arr) values ([10, -20]);
|
||||
INSERT INTO test_array_ops(arr) values ([]);
|
||||
|
||||
SELECT count(*) FROM test_array_ops where arr < CAST([10, -20] AS Array(Nullable(Int64)));
|
||||
SELECT count(*) FROM test_array_ops where arr > CAST([10, -20] AS Array(Nullable(Int64)));
|
||||
SELECT count(*) FROM test_array_ops where arr >= CAST([10, -20] AS Array(Nullable(Int64)));
|
||||
SELECT count(*) FROM test_array_ops where arr <= CAST([10, -20] AS Array(Nullable(Int64)));
|
||||
SELECT count(*) FROM test_array_ops where arr = CAST([10, -20] AS Array(Nullable(Int64)));
|
||||
SELECT count(*) FROM test_array_ops where arr IN( CAST([10, -20] AS Array(Nullable(Int64))), CAST([null,10, -20] AS Array(Nullable(Int64))));
|
||||
|
||||
DROP TABLE test_array_ops;
|
Loading…
Reference in New Issue
Block a user