Remove useless method and it's usages

This commit is contained in:
alesapin 2020-03-23 12:50:54 +03:00
parent c7863e1ac6
commit fd7be934bb
3 changed files with 0 additions and 15 deletions

View File

@ -580,13 +580,6 @@ public:
return column_sizes;
}
/// Calculates column sizes in compressed form for the current state of data_parts.
void recalculateColumnSizes()
{
auto lock = lockParts();
calculateColumnSizesImpl();
}
/// For ATTACH/DETACH/DROP PARTITION.
String getPartitionIDFromQuery(const ASTPtr & ast, const Context & context);

View File

@ -159,14 +159,12 @@ BlockOutputStreamPtr StorageMergeTree::write(const ASTPtr & /*query*/, const Con
void StorageMergeTree::checkTableCanBeDropped() const
{
auto table_id = getStorageID();
const_cast<StorageMergeTree &>(*this).recalculateColumnSizes();
global_context.checkTableCanBeDropped(table_id.database_name, table_id.table_name, getTotalActiveSizeInBytes());
}
void StorageMergeTree::checkPartitionCanBeDropped(const ASTPtr & partition)
{
auto table_id = getStorageID();
const_cast<StorageMergeTree &>(*this).recalculateColumnSizes();
const String partition_id = getPartitionIDFromQuery(partition, global_context);
auto parts_to_remove = getDataPartsVectorInPartition(MergeTreeDataPartState::Committed, partition_id);

View File

@ -3160,8 +3160,6 @@ bool StorageReplicatedMergeTree::executeMetadataAlter(const StorageReplicatedMer
/// This transaction may not happen, but it's OK, because on the next retry we will eventually create/update this node
zookeeper->createOrUpdate(replica_path + "/metadata_version", std::to_string(metadata_version), zkutil::CreateMode::Persistent);
recalculateColumnSizes();
return true;
}
@ -3556,8 +3554,6 @@ void StorageReplicatedMergeTree::attachPartition(const ASTPtr & partition, bool
void StorageReplicatedMergeTree::checkTableCanBeDropped() const
{
/// Consider only synchronized data
const_cast<StorageReplicatedMergeTree &>(*this).recalculateColumnSizes();
auto table_id = getStorageID();
global_context.checkTableCanBeDropped(table_id.database_name, table_id.table_name, getTotalActiveSizeInBytes());
}
@ -3565,8 +3561,6 @@ void StorageReplicatedMergeTree::checkTableCanBeDropped() const
void StorageReplicatedMergeTree::checkPartitionCanBeDropped(const ASTPtr & partition)
{
const_cast<StorageReplicatedMergeTree &>(*this).recalculateColumnSizes();
const String partition_id = getPartitionIDFromQuery(partition, global_context);
auto parts_to_remove = getDataPartsVectorInPartition(MergeTreeDataPartState::Committed, partition_id);