mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Add additional tests for queries with toLowCardinality and toNullable
This commit is contained in:
parent
70438f7e6e
commit
13774d897b
@ -627,7 +627,7 @@ private:
|
||||
if (!child_function || !isBooleanFunction(child_function->getFunctionName()))
|
||||
return;
|
||||
|
||||
if (function_node.getResultType()->isNullable() && !child_function->getResultType()->isNullable())
|
||||
if (removeLowCardinality(constant->getResultType())->isNullable())
|
||||
need_rerun_resolve = true;
|
||||
|
||||
if (maybe_invert)
|
||||
|
@ -17,6 +17,10 @@
|
||||
100
|
||||
100
|
||||
101
|
||||
100
|
||||
101
|
||||
100
|
||||
101
|
||||
1
|
||||
1
|
||||
1
|
||||
|
@ -26,7 +26,8 @@ SELECT * FROM test_table WHERE (NOT ((k in (101) = 0) OR (k in (100) = 1))) = 1;
|
||||
SELECT * FROM test_table WHERE ((k not in (101) = 0) OR (k in (100) = 1)) = 1;
|
||||
SELECT * FROM test_table WHERE ((k not in (99) = 1) AND (k in (100) = 1)) = 1;
|
||||
SELECT * FROM test_table WHERE ((k not in (101) = toNullable(0)) OR (k in (100) = toNullable(1))) = toNullable(1);
|
||||
|
||||
SELECT * FROM test_table WHERE (((k NOT IN toLowCardinality(toNullable(101))) = toLowCardinality(toNullable(0))) OR ((k IN (toLowCardinality(100))) = toNullable(1)));
|
||||
SELECT * FROM test_table WHERE (((k IN toLowCardinality(toNullable(101))) = toLowCardinality(toNullable(0))) AND ((k NOT IN (toLowCardinality(100))) = toNullable(1))) = toNullable(toLowCardinality(0));
|
||||
|
||||
SELECT count()
|
||||
FROM
|
||||
|
Loading…
Reference in New Issue
Block a user