mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #7366 from achimbab/fixbug_inop
Made IN operator support Array(LowCardinality(Nullable(String)))
This commit is contained in:
commit
0d2a2c332f
@ -424,7 +424,8 @@ void Set::checkColumnsNumber(size_t num_key_columns) const
|
||||
|
||||
void Set::checkTypesEqual(size_t set_type_idx, const DataTypePtr & other_type) const
|
||||
{
|
||||
if (!removeNullable(data_types[set_type_idx])->equals(*removeNullable(other_type)))
|
||||
|
||||
if (!removeNullable(recursiveRemoveLowCardinality(data_types[set_type_idx]))->equals(*removeNullable(recursiveRemoveLowCardinality(other_type))))
|
||||
throw Exception("Types of column " + toString(set_type_idx + 1) + " in section IN don't match: "
|
||||
+ data_types[set_type_idx]->getName() + " on the right, " + other_type->getName() +
|
||||
" on the left.", ErrorCodes::TYPE_MISMATCH);
|
||||
|
@ -10,3 +10,4 @@ a 1
|
||||
b 1
|
||||
1 1
|
||||
2 1
|
||||
['1']
|
||||
|
@ -9,3 +9,9 @@ select val, val in (select arrayJoin([1, 3])) from lc_00688;
|
||||
select str, str in (select str from lc_00688) from lc_00688;
|
||||
select val, val in (select val from lc_00688) from lc_00688;
|
||||
drop table if exists lc_00688;
|
||||
|
||||
drop table if exists ary_lc_null;
|
||||
CREATE TABLE ary_lc_null (i int, v Array(LowCardinality(Nullable(String)))) ENGINE = MergeTree() ORDER BY i ;
|
||||
INSERT INTO ary_lc_null VALUES (1, ['1']);
|
||||
SELECT v FROM ary_lc_null WHERE v IN (SELECT v FROM ary_lc_null);
|
||||
drop table if exists ary_lc_null;
|
||||
|
Loading…
Reference in New Issue
Block a user