mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
parent
be85f9f98a
commit
c8f51bdc8a
@ -18,3 +18,7 @@ Nullable(UInt8) \N 1 ok ok ok
|
|||||||
Nullable(UInt8) \N 1 ok ok ok
|
Nullable(UInt8) \N 1 ok ok ok
|
||||||
Nullable(UInt8) \N 1 ok ok ok
|
Nullable(UInt8) \N 1 ok ok ok
|
||||||
\N 1 Nullable(Int8) \N ok
|
\N 1 Nullable(Int8) \N ok
|
||||||
|
\N Nullable(Float64) 0
|
||||||
|
\N Nullable(Float64) 0
|
||||||
|
1
|
||||||
|
1
|
||||||
|
@ -36,3 +36,20 @@ SELECT b_num, isNull(b_num), toTypeName(b_num), b_num = 0, if(b_num = 0, 'fail',
|
|||||||
FROM (SELECT 1 k, toInt8(1) a_num) AS x
|
FROM (SELECT 1 k, toInt8(1) a_num) AS x
|
||||||
LEFT JOIN (SELECT 2 k, toInt8(1) b_num) AS y
|
LEFT JOIN (SELECT 2 k, toInt8(1) b_num) AS y
|
||||||
USING (k);
|
USING (k);
|
||||||
|
|
||||||
|
-- test case from https://github.com/ClickHouse/ClickHouse/issues/7347
|
||||||
|
DROP TABLE IF EXISTS test_nullable_float_issue7347;
|
||||||
|
CREATE TABLE test_nullable_float_issue7347 (ne UInt64,test Nullable(Float64)) ENGINE = MergeTree() PRIMARY KEY (ne) ORDER BY (ne);
|
||||||
|
INSERT INTO test_nullable_float_issue7347 VALUES (1,NULL);
|
||||||
|
|
||||||
|
SELECT test, toTypeName(test), IF(test = 0, 1, 0) FROM test_nullable_float_issue7347;
|
||||||
|
|
||||||
|
WITH materialize(CAST(NULL, 'Nullable(Float64)')) AS test SELECT test, toTypeName(test), IF(test = 0, 1, 0);
|
||||||
|
|
||||||
|
DROP TABLE test_nullable_float_issue7347;
|
||||||
|
|
||||||
|
-- test case from https://github.com/ClickHouse/ClickHouse/issues/10846
|
||||||
|
|
||||||
|
SELECT if(isFinite(toUInt64OrZero(toNullable('123'))), 1, 0);
|
||||||
|
|
||||||
|
SELECT if(materialize(isFinite(toUInt64OrZero(toNullable('123')))), 1, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user