mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
ColumnSparse: fixes
This commit is contained in:
parent
b5b624f3d7
commit
65aceaa668
@ -217,8 +217,17 @@ SerializationPtr IDataType::getSerialization(const NameAndTypePair & column, con
|
|||||||
return subcolumn_type.getSerialization(column.name, callback);
|
return subcolumn_type.getSerialization(column.name, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
auto type_in_storage = column.getTypeInStorage();
|
const auto & type_in_storage = column.getTypeInStorage();
|
||||||
return type_in_storage->getSubcolumnSerialization(column.getSubcolumnName(), base_serialization_getter);
|
auto subcolumn_serialization = type_in_storage->getSubcolumnSerialization(column.getSubcolumnName(), base_serialization_getter);
|
||||||
|
|
||||||
|
if (type_in_storage->supportsSparseSerialization())
|
||||||
|
{
|
||||||
|
auto sparse_idx_name = escapeForFileName(column.getNameInStorage()) + ".sparse.idx";
|
||||||
|
if (callback(sparse_idx_name))
|
||||||
|
subcolumn_serialization = std::make_shared<SerializationSparse>(subcolumn_serialization);
|
||||||
|
|
||||||
|
return subcolumn_serialization;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return column.type->getSerialization(column.name, callback);
|
return column.type->getSerialization(column.name, callback);
|
||||||
|
@ -52,9 +52,13 @@ namespace JoinCommon
|
|||||||
|
|
||||||
void convertColumnToNullable(ColumnWithTypeAndName & column, bool low_card_nullability)
|
void convertColumnToNullable(ColumnWithTypeAndName & column, bool low_card_nullability)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (column.column->isSparse())
|
||||||
|
column.column = recursiveRemoveSparse(column.column);
|
||||||
|
|
||||||
if (low_card_nullability && column.type->lowCardinality())
|
if (low_card_nullability && column.type->lowCardinality())
|
||||||
{
|
{
|
||||||
column.column = recursiveRemoveLowCardinality(recursiveRemoveSparse(column.column));
|
column.column = recursiveRemoveLowCardinality(column.column);
|
||||||
column.type = recursiveRemoveLowCardinality(column.type);
|
column.type = recursiveRemoveLowCardinality(column.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@ IProcessor::Status AggregatingInOrderTransform::prepare()
|
|||||||
return Status::NeedData;
|
return Status::NeedData;
|
||||||
}
|
}
|
||||||
current_chunk = input.pull(!is_consume_finished);
|
current_chunk = input.pull(!is_consume_finished);
|
||||||
|
convertToFullIfSparse(current_chunk);
|
||||||
return Status::Ready;
|
return Status::Ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user