mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Added a test #4767
This commit is contained in:
parent
1df5c7cedf
commit
5b5de975e1
@ -0,0 +1,22 @@
|
|||||||
|
hello
|
||||||
|
world
|
||||||
|
|
||||||
|
z
|
||||||
|
hello
|
||||||
|
world
|
||||||
|
1
|
||||||
|
\N
|
||||||
|
\N
|
||||||
|
nan
|
||||||
|
inf
|
||||||
|
-0
|
||||||
|
123
|
||||||
|
-1
|
||||||
|
4294967295
|
||||||
|
['world']
|
||||||
|
[[[]]]
|
||||||
|
[[[],[]]]
|
||||||
|
[]
|
||||||
|
[NULL]
|
||||||
|
[0]
|
||||||
|
[NULL]
|
34
tests/queries/0_stateless/01246_least_greatest_generic.sql
Normal file
34
tests/queries/0_stateless/01246_least_greatest_generic.sql
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
SELECT least('hello', 'world');
|
||||||
|
SELECT greatest('hello', 'world');
|
||||||
|
SELECT least('hello', 'world', '');
|
||||||
|
SELECT greatest('hello', 'world', 'z');
|
||||||
|
|
||||||
|
SELECT least('hello');
|
||||||
|
SELECT greatest('world');
|
||||||
|
|
||||||
|
SELECT least(1, inf, nan);
|
||||||
|
SELECT least(1, inf, nan, NULL);
|
||||||
|
SELECT greatest(1, inf, nan, NULL);
|
||||||
|
SELECT greatest(1, inf, nan);
|
||||||
|
SELECT greatest(1, inf);
|
||||||
|
|
||||||
|
SELECT least(0., -0.);
|
||||||
|
SELECT least(toNullable(123), 456);
|
||||||
|
|
||||||
|
SELECT LEAST(-1, 18446744073709551615); -- { serverError 386 }
|
||||||
|
SELECT LEAST(-1., 18446744073709551615); -- { serverError 386 }
|
||||||
|
SELECT LEAST(-1., 18446744073709551615.);
|
||||||
|
SELECT greatest(-1, 1, 4294967295);
|
||||||
|
|
||||||
|
SELECT greatest([], ['hello'], ['world']);
|
||||||
|
|
||||||
|
SELECT least([[[], []]], [[[]]], [[[]], [[]]]);
|
||||||
|
SELECT greatest([[[], []]], [[[]]], [[[]], [[]]]);
|
||||||
|
|
||||||
|
SELECT least([], [NULL]);
|
||||||
|
SELECT greatest([], [NULL]);
|
||||||
|
|
||||||
|
SELECT LEAST([NULL], [0]);
|
||||||
|
SELECT GREATEST([NULL], [0]);
|
||||||
|
|
||||||
|
SELECT Greatest(); -- { serverError 42 }
|
Loading…
Reference in New Issue
Block a user