Merge pull request #3670 from abyss7/CLICKHOUSE-3766

Rename method partition() → alterPartition()
This commit is contained in:
alexey-milovidov 2018-11-26 20:09:37 +03:00 committed by GitHub
commit 7e9e5c383a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 12 additions and 12 deletions

View File

@ -48,7 +48,7 @@ else ()
link_directories (${LLVM_LIBRARY_DIRS})
endif ()
add_executable (clickhouse main.cpp)
target_link_libraries (clickhouse PRIVATE clickhouse_common_io)
target_link_libraries (clickhouse PRIVATE clickhouse_common_io string_utils)
target_include_directories (clickhouse BEFORE PRIVATE ${COMMON_INCLUDE_DIR})
target_include_directories (clickhouse PRIVATE ${CMAKE_CURRENT_BINARY_DIR})

View File

@ -57,7 +57,7 @@ BlockIO InterpreterAlterQuery::execute()
if (!partition_commands.empty())
{
partition_commands.validate(*table);
table->partition(query_ptr, partition_commands, context);
table->alterPartition(query_ptr, partition_commands, context);
}
if (!alter_commands.empty())

View File

@ -256,7 +256,7 @@ public:
/** ALTER tables with regard to its partitions.
* Should handle locks for each command on its own.
*/
virtual void partition(const ASTPtr & /* query */, const PartitionCommands & /* commands */, const Context & /* context */)
virtual void alterPartition(const ASTPtr & /* query */, const PartitionCommands & /* commands */, const Context & /* context */)
{
throw Exception("Partition operations are not supported by storage " + getName(), ErrorCodes::NOT_IMPLEMENTED);
}

View File

@ -240,10 +240,10 @@ bool StorageMaterializedView::optimize(const ASTPtr & query, const ASTPtr & part
return getTargetTable()->optimize(query, partition, final, deduplicate, context);
}
void StorageMaterializedView::partition(const ASTPtr & query, const PartitionCommands &commands, const Context &context)
void StorageMaterializedView::alterPartition(const ASTPtr & query, const PartitionCommands &commands, const Context &context)
{
checkStatementCanBeForwarded();
getTargetTable()->partition(query, commands, context);
getTargetTable()->alterPartition(query, commands, context);
}
void StorageMaterializedView::mutate(const MutationCommands & commands, const Context & context)

View File

@ -35,7 +35,7 @@ public:
bool optimize(const ASTPtr & query, const ASTPtr & partition, bool final, bool deduplicate, const Context & context) override;
void partition(const ASTPtr & query, const PartitionCommands & commands, const Context & context) override;
void alterPartition(const ASTPtr & query, const PartitionCommands & commands, const Context & context) override;
void mutate(const MutationCommands & commands, const Context & context) override;

View File

@ -781,7 +781,7 @@ bool StorageMergeTree::optimize(
return true;
}
void StorageMergeTree::partition(const ASTPtr & query, const PartitionCommands & commands, const Context & context)
void StorageMergeTree::alterPartition(const ASTPtr & query, const PartitionCommands & commands, const Context & context)
{
for (const PartitionCommand & command : commands)
{
@ -824,7 +824,7 @@ void StorageMergeTree::partition(const ASTPtr & query, const PartitionCommands &
break;
default:
IStorage::partition(query, commands, context); // should throw an exception.
IStorage::alterPartition(query, commands, context); // should throw an exception.
}
}
}

View File

@ -60,7 +60,7 @@ public:
*/
bool optimize(const ASTPtr & query, const ASTPtr & partition, bool final, bool deduplicate, const Context & context) override;
void partition(const ASTPtr & query, const PartitionCommands & commands, const Context & context) override;
void alterPartition(const ASTPtr & query, const PartitionCommands & commands, const Context & context) override;
void mutate(const MutationCommands & commands, const Context & context) override;

View File

@ -3282,7 +3282,7 @@ void StorageReplicatedMergeTree::alter(const AlterCommands & params,
LOG_DEBUG(log, "ALTER finished");
}
void StorageReplicatedMergeTree::partition(const ASTPtr & query, const PartitionCommands & commands, const Context & context)
void StorageReplicatedMergeTree::alterPartition(const ASTPtr & query, const PartitionCommands & commands, const Context & context)
{
for (const PartitionCommand & command : commands)
{
@ -3329,7 +3329,7 @@ void StorageReplicatedMergeTree::partition(const ASTPtr & query, const Partition
break;
default:
IStorage::partition(query, commands, context); // should throw an exception.
IStorage::alterPartition(query, commands, context); // should throw an exception.
}
}
}

View File

@ -116,7 +116,7 @@ public:
void alter(const AlterCommands & params, const String & database_name, const String & table_name, const Context & context) override;
void partition(const ASTPtr & query, const PartitionCommands & commands, const Context & context) override;
void alterPartition(const ASTPtr & query, const PartitionCommands & commands, const Context & context) override;
void mutate(const MutationCommands & commands, const Context & context) override;