Merge pull request #28205 from ClickHouse/fix-lc-and-inifinite-fields

Fix insertion of fields with Infinity values in nullable low cardinality columns
This commit is contained in:
Nikolai Kochetov 2021-08-27 11:28:13 +03:00 committed by GitHub
commit 614e30e601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -301,7 +301,7 @@ size_t ColumnUnique<ColumnType>::getNullValueIndex() const
template <typename ColumnType>
size_t ColumnUnique<ColumnType>::uniqueInsert(const Field & x)
{
if (x.getType() == Field::Types::Null)
if (x.isNull())
return getNullValueIndex();
if (valuesHaveFixedSize())

View File

@ -0,0 +1,4 @@
0 \N
0 \N
0 \N

View File

@ -0,0 +1,3 @@
set receive_timeout = '10', receive_data_timeout_ms = '10000', extremes = '1', allow_suspicious_low_cardinality_types = '1', force_primary_key = '1', join_use_nulls = '1', max_rows_to_read = '1', join_algorithm = 'partial_merge';
SELECT * FROM (SELECT dummy AS val FROM system.one) AS s1 ANY LEFT JOIN (SELECT toLowCardinality(dummy) AS rval FROM system.one) AS s2 ON (val + 9223372036854775806) = (rval * 1);