Added a test from Silviu Caragea #2115

This commit is contained in:
Alexey Milovidov 2018-07-06 22:22:12 +03:00
parent 43111f2ac9
commit 299d029d35
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,5 @@
[NULL,'str1','str2'] 1
['str1','str2'] 1
[] 0
[] 0
1

View File

@ -0,0 +1,9 @@
DROP TABLE IF EXISTS test.has_function;
CREATE TABLE test.has_function(arr Array(Nullable(String))) ENGINE = Memory;
INSERT INTO test.has_function(arr) values ([null, 'str1', 'str2']),(['str1', 'str2']), ([]), ([]);
SELECT arr, has(`arr`, 'str1') FROM test.has_function;
SELECT has([null, 'str1', 'str2'], 'str1');
DROP TABLE test.has_function;