Add LowCardinality conversion to Native format if types of columns are not equals.

This commit is contained in:
Nikolai Kochetov 2019-09-10 17:30:13 +03:00
parent 30394113a1
commit 071b5dd514

View File

@ -157,7 +157,7 @@ Block NativeBlockInputStream::readImpl()
bool revision_without_low_cardinality = server_revision && server_revision < DBMS_MIN_REVISION_WITH_LOW_CARDINALITY_TYPE;
if (header && (convert_types_to_low_cardinality
|| revision_without_low_cardinality
|| header.getByPosition(i).type->equals(*column.type)))
|| !header.getByPosition(i).type->equals(*column.type)))
{
column.column = recursiveLowCardinalityConversion(column.column, column.type, header.getByPosition(i).type);
column.type = header.getByPosition(i).type;