mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Rename method partition() → alterPartition()
Also fix build with internal shared libraries.
This commit is contained in:
parent
757d808a57
commit
73aa7f2027
@ -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})
|
||||
|
||||
|
@ -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())
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user