Fix cast lowcard of nullable in JoinSwitcher

This commit is contained in:
vdimir 2022-05-23 13:05:59 +00:00
parent 7d88b81622
commit dabb150a95
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
3 changed files with 8 additions and 1 deletions

View File

@ -66,7 +66,7 @@ void JoinSwitcher::switchJoin()
for (const auto & sample_column : right_sample_block)
{
positions.emplace_back(tmp_block.getPositionByName(sample_column.name));
is_nullable.emplace_back(sample_column.type->isNullable());
is_nullable.emplace_back(JoinCommon::isNullable(sample_column.type));
}
}

View File

@ -0,0 +1,6 @@
SET max_bytes_in_join = '100', join_algorithm = 'auto';
SELECT 3 == count() FROM (SELECT toLowCardinality(toNullable(number)) AS l FROM system.numbers LIMIT 3) AS s1
ANY LEFT JOIN (SELECT toLowCardinality(toNullable(number)) AS r FROM system.numbers LIMIT 4) AS s2 ON l = r
;