Added a test from Silviu Caragea #2113

This commit is contained in:
Alexey Milovidov 2018-04-06 03:28:53 +03:00
parent 30dd11f8ca
commit 65ad97452b
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,6 @@
1
1
2
2
1
2

View 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;