mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fixed error with IN where left hand side is nullable #1846
This commit is contained in:
parent
2ae9e719c6
commit
ac58f92a97
@ -729,6 +729,11 @@ public:
|
||||
return std::make_shared<DataTypeUInt8>();
|
||||
}
|
||||
|
||||
bool useDefaultImplementationForNulls() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void executeImpl(Block & block, const ColumnNumbers & arguments, size_t result) override
|
||||
{
|
||||
/// Second argument must be ColumnSet.
|
||||
|
@ -0,0 +1,3 @@
|
||||
1
|
||||
100
|
||||
10 10 10
|
14
dbms/tests/queries/0_stateless/00618_nullable_in.sql
Normal file
14
dbms/tests/queries/0_stateless/00618_nullable_in.sql
Normal file
@ -0,0 +1,14 @@
|
||||
SELECT sum(toNullable('a') IN 'a');
|
||||
SELECT countIf(number, toNullable('a') IN ('a', 'b')) FROM numbers(100);
|
||||
|
||||
SELECT
|
||||
uniqExact(x) AS u,
|
||||
uniqExactIf(x, name = 'a') AS ue,
|
||||
uniqExactIf(x, name IN ('a', 'b')) AS ui
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
toNullable('a') AS name,
|
||||
arrayJoin(range(10)) AS x
|
||||
)
|
||||
WHERE name = 'a';
|
Loading…
Reference in New Issue
Block a user