mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
359 lines
3.2 KiB
Plaintext
359 lines
3.2 KiB
Plaintext
----- NULL value -----
|
|
\N
|
|
\N
|
|
\N
|
|
\N
|
|
----- 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
|
|
----- 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
|
|
----- 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
|
|
----- 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
|
|
----- 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
|
|
----- Insert with expression -----
|
|
[2]
|
|
----- Insert. Source and target columns have same types up to nullability. -----
|
|
2 7
|
|
4 3
|
|
5 1
|
|
6 9
|
|
8 2
|
|
----- 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
|
|
----- 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
|
|
----- 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
|
|
9 \N 9
|
|
42 42 \N
|
|
\N 6 \N
|
|
\N \N \N
|
|
1
|
|
----- 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
|
|
----- assumeNotNull -----
|
|
2
|
|
5
|
|
9
|
|
42
|
|
----- IS NULL, IS NOT NULL -----
|
|
2
|
|
5
|
|
9
|
|
42
|
|
\N
|
|
\N
|
|
----- 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)
|
|
----- 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
|
|
----- Array functions -----
|
|
[NULL]
|
|
[NULL,NULL,NULL]
|
|
[NULL,2,3]
|
|
[1,NULL,3]
|
|
[1,2,NULL]
|
|
[NULL,'b','c']
|
|
['a',NULL,'c']
|
|
['a','b',NULL]
|
|
----- arrayElement -----
|
|
----- constant arrays -----
|
|
1
|
|
\N
|
|
2
|
|
3
|
|
a
|
|
\N
|
|
c
|
|
d
|
|
1
|
|
\N
|
|
2
|
|
3
|
|
----- 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
|
|
----- 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
|
|
----- variable arrays -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