mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
36 lines
919 B
C++
36 lines
919 B
C++
#pragma once
|
||
|
||
#include <DB/Storages/AlterCommands.h>
|
||
#include <string>
|
||
|
||
namespace DB
|
||
{
|
||
|
||
/** Описание задачи перешардирования.
|
||
*/
|
||
struct ReshardingJob final
|
||
{
|
||
public:
|
||
/// Создаёт описание на основе его сериализованного представления.
|
||
ReshardingJob(const std::string & serialized_job);
|
||
|
||
ReshardingJob(const std::string & database_name_, const std::string & table_name_,
|
||
const std::string & partition_, const WeightedZooKeeperPaths & paths_,
|
||
const ASTPtr & sharding_key_expr_);
|
||
|
||
ReshardingJob(const ReshardingJob &) = delete;
|
||
ReshardingJob & operator=(const ReshardingJob &) = delete;
|
||
|
||
/// Сериализует описание задачи.
|
||
std::string toString() const;
|
||
|
||
public:
|
||
std::string database_name;
|
||
std::string table_name;
|
||
std::string partition;
|
||
WeightedZooKeeperPaths paths;
|
||
ASTPtr sharding_key_expr;
|
||
};
|
||
|
||
}
|