mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fix empty columns case
This commit is contained in:
parent
726f7f9823
commit
067eb4599d
@ -541,8 +541,9 @@ CompressionCodecPtr IMergeTreeDataPart::detectDefaultCompressionCodec() const
|
||||
CompressionCodecPtr result = nullptr;
|
||||
for (const auto & part_column : columns)
|
||||
{
|
||||
/// It was compressed with default codec
|
||||
if (!storage_columns.hasCompressionCodec(part_column.name))
|
||||
/// It was compressed with default codec and it's not empty
|
||||
auto column_size = getColumnSize(part_column.name, *part_column.type);
|
||||
if (column_size.data_compressed != 0 && !storage_columns.hasCompressionCodec(part_column.name))
|
||||
{
|
||||
result = getCompressionCodecForFile(volume->getDisk(), getFullRelativePath() + getFileNameForColumn(part_column) + ".bin");
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user