mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-12 02:23:14 +00:00
Remove useless method and it's usages
This commit is contained in:
parent
c7863e1ac6
commit
fd7be934bb
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user