mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
dbms: cleanup [#METR-19266]
This commit is contained in:
parent
eb98892e61
commit
7a4683140e
@ -264,7 +264,6 @@ MergeTreeDataPartChecksums MergeTreeDataPartChecksums::parse(const String & s)
|
|||||||
|
|
||||||
|
|
||||||
/// Returns the size of .bin file for column `name` if found, zero otherwise.
|
/// Returns the size of .bin file for column `name` if found, zero otherwise.
|
||||||
/// If this column is nullable, take into account the size of the .null file as well.
|
|
||||||
std::size_t MergeTreeDataPart::getColumnSize(const String & name) const
|
std::size_t MergeTreeDataPart::getColumnSize(const String & name) const
|
||||||
{
|
{
|
||||||
if (checksums.empty())
|
if (checksums.empty())
|
||||||
@ -277,14 +276,7 @@ std::size_t MergeTreeDataPart::getColumnSize(const String & name) const
|
|||||||
if (0 == files.count(bin_file_name))
|
if (0 == files.count(bin_file_name))
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
const auto null_file_name = escapeForFileName(name) + ".null";
|
return files.at(bin_file_name).file_size;
|
||||||
size_t null_size;
|
|
||||||
if (0 == files.count(null_file_name))
|
|
||||||
null_size = 0;
|
|
||||||
else
|
|
||||||
null_size = files.at(null_file_name).file_size;
|
|
||||||
|
|
||||||
return files.at(bin_file_name).file_size + null_size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the name of a column with minimum compressed size (as returned by getColumnSize()).
|
/** Returns the name of a column with minimum compressed size (as returned by getColumnSize()).
|
||||||
|
Loading…
Reference in New Issue
Block a user