dbms: cleanup [#METR-19266]

This commit is contained in:
Alexey Arno 2016-08-19 12:08:48 +03:00
parent eb98892e61
commit 7a4683140e

View File

@ -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()).