ClickHouse/dbms/tests/queries/0_stateless/00395_nullable.reference

358 lines
3.2 KiB
Plaintext
Raw Normal View History

2017-12-19 01:44:05 +00:00
----- NULL value -----
\N
\N
\N
\N
2017-12-19 01:44:05 +00:00
----- MergeTree engine -----
1 1 a a [1] [1] ['a'] ['a'] 2000-01-01
1 1 a a [1] [1] ['a'] [NULL] 2000-01-01
1 1 a a [1] [NULL] ['a'] ['a'] 2000-01-01
1 1 a \N [1] [1] ['a'] ['a'] 2000-01-01
1 \N a a [1] [1] ['a'] ['a'] 2000-01-01
2017-12-19 01:44:05 +00:00
----- Memory engine -----
1 1 a a [1] [1] ['a'] ['a'] 2000-01-01
1 1 a a [1] [1] ['a'] [NULL] 2000-01-01
1 1 a a [1] [NULL] ['a'] ['a'] 2000-01-01
1 1 a \N [1] [1] ['a'] ['a'] 2000-01-01
1 \N a a [1] [1] ['a'] ['a'] 2000-01-01
2017-12-19 01:44:05 +00:00
----- TinyLog engine -----
1 1 a a [1] [1] ['a'] ['a'] 2000-01-01
1 1 a a [1] [1] ['a'] [NULL] 2000-01-01
1 1 a a [1] [NULL] ['a'] ['a'] 2000-01-01
1 1 a \N [1] [1] ['a'] ['a'] 2000-01-01
1 \N a a [1] [1] ['a'] ['a'] 2000-01-01
2017-12-19 01:44:05 +00:00
----- Log engine -----
1 1 a a [1] [1] ['a'] ['a'] 2000-01-01
1 1 a a [1] [1] ['a'] [NULL] 2000-01-01
1 1 a a [1] [NULL] ['a'] ['a'] 2000-01-01
1 1 a \N [1] [1] ['a'] ['a'] 2000-01-01
1 \N a a [1] [1] ['a'] ['a'] 2000-01-01
2017-12-19 01:44:05 +00:00
----- StripeLog engine -----
1 1 a a [1] [1] ['a'] ['a'] 2000-01-01
1 1 a a [1] [1] ['a'] [NULL] 2000-01-01
1 1 a a [1] [NULL] ['a'] ['a'] 2000-01-01
1 1 a \N [1] [1] ['a'] ['a'] 2000-01-01
1 \N a a [1] [1] ['a'] ['a'] 2000-01-01
2017-12-19 01:44:05 +00:00
----- Insert with expression -----
[2]
2017-12-19 01:44:05 +00:00
----- Insert. Source and target columns have same types up to nullability. -----
2 7
4 3
5 1
6 9
8 2
2017-12-19 01:44:05 +00:00
----- Apply functions and aggregate functions on columns that may contain null values -----
2 7 9 14
5 1 6 35
9 \N \N 63
42 42 84 294
\N 6 \N \N
\N \N \N \N
58
406
2017-12-19 01:44:05 +00:00
----- isNull, isNotNull -----
2 7 0 1
5 1 0 1
9 \N 0 0
42 42 0 1
\N 6 1 1
\N \N 1 0
2017-12-19 01:44:05 +00:00
----- ifNull, nullIf -----
2 7 2
5 1 5
9 \N 9
42 42 42
\N 6 6
\N \N \N
2 7 2
5 1 5
2019-05-10 10:42:00 +00:00
9 \N 9
42 42 \N
\N 6 \N
\N \N \N
2017-12-19 01:44:05 +00:00
----- coalesce -----
\N
1
1
42
\N
2 7 2
5 1 5
9 \N 9
42 42 42
\N 6 6
\N \N \N
2 7 2
5 1 5
9 \N 9
42 42 42
\N 6 6
\N \N 99
2017-12-19 01:44:05 +00:00
----- assumeNotNull -----
2
5
9
42
2017-12-19 01:44:05 +00:00
----- IS NULL, IS NOT NULL -----
2
5
9
42
\N
\N
2019-05-10 10:42:00 +00:00
----- if -----
a 1 UInt8
b 1 UInt8
c 0 UInt8
\N 0 UInt8
a \N Nullable(UInt8)
b \N Nullable(UInt8)
c 0 Nullable(UInt8)
\N 0 Nullable(UInt8)
----- case when -----
a 1 UInt8
b 1 UInt8
c 0 UInt8
\N 0 UInt8
a \N Nullable(UInt8)
b \N Nullable(UInt8)
c 0 Nullable(UInt8)
\N 0 Nullable(UInt8)
a 1 Nullable(UInt8)
b 1 Nullable(UInt8)
c \N Nullable(UInt8)
\N \N Nullable(UInt8)
2017-12-19 01:44:05 +00:00
----- multiIf -----
\N
2
\N
A
A\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
3
2
2
42
\N
2
1
99
99
2017-12-19 01:44:05 +00:00
----- Array functions -----
2016-12-30 06:28:20 +00:00
[NULL]
[NULL,NULL,NULL]
[NULL,2,3]
[1,NULL,3]
[1,2,NULL]
[NULL,'b','c']
['a',NULL,'c']
['a','b',NULL]
2017-12-19 01:44:05 +00:00
----- arrayElement -----
----- constant arrays -----
1
\N
2
3
a
\N
c
d
1
\N
2
3
2017-12-19 01:44:05 +00:00
----- variable arrays -----
2
\N
2
2
\N
3
3
\N
3
\N
7
7
7
\N
\N
\N
4
\N
4
\N
a
\N
a
a
\N
bc
bc
\N
bc
\N
def
def
def
\N
\N
\N
ghij
\N
ghij
\N
2
3
7
4
\N
a
bc
def
ghij
\N
2017-12-19 01:44:05 +00:00
----- has -----
----- constant arrays -----
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
0
1
1
1
2017-12-19 01:44:05 +00:00
----- variable arrays -----
1
0
1
1
0
1
1
0
1
0
0
1
0
1
0
0
0
0
0
0
1
1
1
0
0
1
1
1
1
1
1
0
1
1
0
2018-07-07 18:52:58 +00:00
1
1
0
1
0
1
1
2018-07-07 18:52:58 +00:00
1
0
0
0
1
0
2018-07-07 18:52:58 +00:00
1
0
1
1
1
1
1
1
1
2018-07-07 18:52:58 +00:00
1
0
1
1
1
0
1
1
1
2018-07-07 18:52:58 +00:00
1
1
1
1
1
1
1
2017-12-19 01:44:05 +00:00
----- Aggregation -----
A 0 2
2017-01-30 08:28:42 +00:00
A 1 2
B 1 4
C 1 1
2017-01-30 08:28:42 +00:00
C \N 3
\N 1 1
2017-01-30 08:28:42 +00:00
\N \N 1
A 0 2
A 1 2
B 1 4
C 1 1
2017-01-30 08:28:42 +00:00
C \N 3
A 4
2017-01-30 08:28:42 +00:00
B 4
C 4
2017-02-10 16:57:12 +00:00
\N 2
0 2
1 7
2017-02-10 16:57:12 +00:00
\N 3
0 2 1
0 3 1
2017-01-30 08:28:42 +00:00
1 2 2
1 3 2
2017-01-30 08:28:42 +00:00
1 5 3
\N 2 1
\N 3 2
0 2 1 1
2017-01-30 08:28:42 +00:00
0 3 \N 1
1 2 1 1
1 2 \N 1
2017-01-30 08:28:42 +00:00
1 3 1 1
1 3 \N 1
2017-01-30 08:28:42 +00:00
1 5 1 2
1 5 \N 1
\N 2 \N 1
\N 3 1 1
2017-01-30 08:28:42 +00:00
\N 3 \N 1
[0] 2
[1] 7
2016-12-30 06:28:20 +00:00
[NULL] 3