mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Added test [#CLICKHOUSE-2789].
This commit is contained in:
parent
abe0fca1a4
commit
75f1d7b820
46
dbms/tests/queries/0_stateless/00435_coalesce.reference
Normal file
46
dbms/tests/queries/0_stateless/00435_coalesce.reference
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
\N \N \N 1 1 1 1
|
||||||
|
0 Nullable(UInt64)
|
||||||
|
\N Nullable(UInt64)
|
||||||
|
2 Nullable(UInt64)
|
||||||
|
3 Nullable(UInt64)
|
||||||
|
4 Nullable(UInt64)
|
||||||
|
5 Nullable(UInt64)
|
||||||
|
6 Nullable(UInt64)
|
||||||
|
\N Nullable(UInt64)
|
||||||
|
8 Nullable(UInt64)
|
||||||
|
9 Nullable(UInt64)
|
||||||
|
10 Nullable(UInt64)
|
||||||
|
\N Nullable(UInt64)
|
||||||
|
12 Nullable(UInt64)
|
||||||
|
\N Nullable(UInt64)
|
||||||
|
14 Nullable(UInt64)
|
||||||
|
0 UInt64
|
||||||
|
1 UInt64
|
||||||
|
2 UInt64
|
||||||
|
3 UInt64
|
||||||
|
4 UInt64
|
||||||
|
5 UInt64
|
||||||
|
6 UInt64
|
||||||
|
7 UInt64
|
||||||
|
8 UInt64
|
||||||
|
9 UInt64
|
||||||
|
10 UInt64
|
||||||
|
11 UInt64
|
||||||
|
12 UInt64
|
||||||
|
13 UInt64
|
||||||
|
14 UInt64
|
||||||
|
0 UInt64
|
||||||
|
100 UInt64
|
||||||
|
2 UInt64
|
||||||
|
3 UInt64
|
||||||
|
4 UInt64
|
||||||
|
100 UInt64
|
||||||
|
6 UInt64
|
||||||
|
100 UInt64
|
||||||
|
8 UInt64
|
||||||
|
9 UInt64
|
||||||
|
10 UInt64
|
||||||
|
100 UInt64
|
||||||
|
12 UInt64
|
||||||
|
100 UInt64
|
||||||
|
14 UInt64
|
6
dbms/tests/queries/0_stateless/00435_coalesce.sql
Normal file
6
dbms/tests/queries/0_stateless/00435_coalesce.sql
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
SELECT coalesce(), coalesce(NULL), coalesce(NULL, NULL),
|
||||||
|
coalesce(1), coalesce(1, NULL), coalesce(NULL, 1), coalesce(NULL, 1, NULL);
|
||||||
|
|
||||||
|
SELECT coalesce(number % 2 = 0 ? number : NULL, number % 3 = 0 ? number : NULL, number % 5 = 0 ? number : NULL) AS res, toTypeName(res) FROM system.numbers LIMIT 15;
|
||||||
|
SELECT coalesce(number % 2 = 0 ? number : NULL, number % 3 = 0 ? number : NULL, number) AS res, toTypeName(res) FROM system.numbers LIMIT 15;
|
||||||
|
SELECT coalesce(number % 2 = 0 ? number : NULL, number % 3 = 0 ? number : NULL, 100) AS res, toTypeName(res) FROM system.numbers LIMIT 15;
|
Loading…
Reference in New Issue
Block a user