未验证 提交 23094b52 编写于 作者: A alexey-milovidov 提交者: GitHub

Merge pull request #12193 from filimonov/tests_for_few_fixed_issues

Tests for fixed issues #10846, #7347, #3767
......@@ -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
\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
LEFT JOIN (SELECT 2 k, toInt8(1) b_num) AS y
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);
DROP TABLE IF EXISTS null_issue_3767;
CREATE TABLE null_issue_3767 (value Nullable(String)) ENGINE=Memory;
INSERT INTO null_issue_3767 (value) VALUES ('A String'), (NULL);
SELECT value FROM null_issue_3767 WHERE value NOT IN ('A String');
DROP TABLE null_issue_3767;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册