mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
Fixup
This commit is contained in:
parent
5e049fdd47
commit
af18905a33
@ -264,6 +264,14 @@ MergeTreeData::MergeTreeData(
|
||||
/// Creating directories, if not exist.
|
||||
for (const auto & disk : getDisks())
|
||||
{
|
||||
/// TODO: implement it the main issue in DataPartsExchange (not able to send directories metadata)
|
||||
if (supportsReplication() && settings->allow_remote_fs_zero_copy_replication
|
||||
&& disk->supportZeroCopyReplication() && metadata_.hasProjections())
|
||||
{
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Projections are not supported when zero-copy replication is enabled for table. "
|
||||
"Currently disk '{}' supports zero copy replication", disk->getName());
|
||||
}
|
||||
|
||||
if (disk->isBroken())
|
||||
continue;
|
||||
|
||||
@ -2033,11 +2041,26 @@ void MergeTreeData::checkAlterIsPossible(const AlterCommands & commands, Context
|
||||
"ALTER ADD INDEX is not supported for tables with the old syntax",
|
||||
ErrorCodes::BAD_ARGUMENTS);
|
||||
}
|
||||
if (command.type == AlterCommand::ADD_PROJECTION && !is_custom_partitioned)
|
||||
if (command.type == AlterCommand::ADD_PROJECTION)
|
||||
|
||||
{
|
||||
throw Exception(
|
||||
"ALTER ADD PROJECTION is not supported for tables with the old syntax",
|
||||
ErrorCodes::BAD_ARGUMENTS);
|
||||
if (!is_custom_partitioned)
|
||||
throw Exception(
|
||||
"ALTER ADD PROJECTION is not supported for tables with the old syntax",
|
||||
ErrorCodes::BAD_ARGUMENTS);
|
||||
|
||||
/// TODO: implement it the main issue in DataPartsExchange (not able to send directories metadata)
|
||||
if (supportsReplication() && getSettings()->allow_remote_fs_zero_copy_replication)
|
||||
{
|
||||
auto storage_policy = getStoragePolicy();
|
||||
auto disks = storage_policy->getDisks();
|
||||
for (const auto & disk : disks)
|
||||
{
|
||||
if (disk->supportZeroCopyReplication())
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "ALTER ADD PROJECTION is not supported when zero-copy replication is enabled for table. "
|
||||
"Currently disk '{}' supports zero copy replication", disk->getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (command.type == AlterCommand::RENAME_COLUMN)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user