Merge pull request #23207 from ClickHouse/fix-bug-in-lowcardinality

Fix fairly terrible bug in LowCardinality #16171
This commit is contained in:
alexey-milovidov 2021-04-17 15:58:50 +03:00 committed by GitHub
commit a1ce6632d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View File

@ -122,7 +122,7 @@ namespace
else if (auto * data_uint64 = getIndexesData<UInt64>(column))
return mapUniqueIndexImpl(*data_uint64);
else
throw Exception("Indexes column for getUniqueIndex must be ColumnUInt, got" + column.getName(),
throw Exception("Indexes column for getUniqueIndex must be ColumnUInt, got " + column.getName(),
ErrorCodes::LOGICAL_ERROR);
}
}
@ -151,7 +151,7 @@ void ColumnLowCardinality::insertFrom(const IColumn & src, size_t n)
const auto * low_cardinality_src = typeid_cast<const ColumnLowCardinality *>(&src);
if (!low_cardinality_src)
throw Exception("Expected ColumnLowCardinality, got" + src.getName(), ErrorCodes::ILLEGAL_COLUMN);
throw Exception("Expected ColumnLowCardinality, got " + src.getName(), ErrorCodes::ILLEGAL_COLUMN);
size_t position = low_cardinality_src->getIndexes().getUInt(n);

View File

@ -66,7 +66,7 @@ ColumnPtr selectIndexImpl(const Column & column, const IColumn & indexes, size_t
else if (auto * data_uint64 = detail::getIndexesData<UInt64>(indexes))
return column.template indexImpl<UInt64>(*data_uint64, limit);
else
throw Exception("Indexes column for IColumn::select must be ColumnUInt, got" + indexes.getName(),
throw Exception("Indexes column for IColumn::select must be ColumnUInt, got " + indexes.getName(),
ErrorCodes::LOGICAL_ERROR);
}

View File

@ -466,7 +466,7 @@ namespace
else if (auto * data_uint64 = getIndexesData<UInt64>(column))
return mapIndexWithAdditionalKeys(*data_uint64, dict_size);
else
throw Exception("Indexes column for mapIndexWithAdditionalKeys must be UInt, got" + column.getName(),
throw Exception("Indexes column for mapIndexWithAdditionalKeys must be UInt, got " + column.getName(),
ErrorCodes::LOGICAL_ERROR);
}
}

View File

@ -35,7 +35,7 @@ public:
{
const auto * type = typeid_cast<const DataTypeLowCardinality *>(arguments[0].get());
if (!type)
throw Exception("First first argument of function lowCardinalityIndexes must be ColumnLowCardinality, but got"
throw Exception("First first argument of function lowCardinalityIndexes must be ColumnLowCardinality, but got "
+ arguments[0]->getName(), ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
return std::make_shared<DataTypeUInt64>();

View File

@ -33,7 +33,7 @@ public:
{
const auto * type = typeid_cast<const DataTypeLowCardinality *>(arguments[0].get());
if (!type)
throw Exception("First first argument of function lowCardinalityKeys must be ColumnLowCardinality, but got"
throw Exception("First first argument of function lowCardinalityKeys must be ColumnLowCardinality, but got "
+ arguments[0]->getName(), ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
return type->getDictionaryType();