mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Disallow write and truncate if archive
This commit is contained in:
parent
828885c66c
commit
a38bb095d8
@ -242,6 +242,13 @@ SinkToStoragePtr StorageObjectStorage::write(
|
||||
const auto sample_block = metadata_snapshot->getSampleBlock();
|
||||
const auto & settings = configuration->getQuerySettings(local_context);
|
||||
|
||||
if (configuration->isArchive())
|
||||
{
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED,
|
||||
"Path '{}' contains archive. Write into archive is not supported",
|
||||
configuration->getPath());
|
||||
}
|
||||
|
||||
if (configuration->withGlobsIgnorePartitionWildcard())
|
||||
{
|
||||
throw Exception(ErrorCodes::DATABASE_ACCESS_DENIED,
|
||||
@ -289,6 +296,13 @@ void StorageObjectStorage::truncate(
|
||||
ContextPtr /* context */,
|
||||
TableExclusiveLockHolder & /* table_holder */)
|
||||
{
|
||||
if (configuration->isArchive())
|
||||
{
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED,
|
||||
"Path '{}' contains archive. Table cannot be truncated",
|
||||
configuration->getPath());
|
||||
}
|
||||
|
||||
if (configuration->withGlobs())
|
||||
{
|
||||
throw Exception(
|
||||
|
Loading…
Reference in New Issue
Block a user