提交 2b20eca0 编写于 作者: A Alexey Milovidov

Preparations, part 4: StorageDistributed is initialized with const Context [#CLICKHOUSE-31].

上级 ce581bbf
...@@ -128,7 +128,7 @@ StorageDistributed::StorageDistributed( ...@@ -128,7 +128,7 @@ StorageDistributed::StorageDistributed(
const String & remote_database_, const String & remote_database_,
const String & remote_table_, const String & remote_table_,
const String & cluster_name_, const String & cluster_name_,
Context & context_, const Context & context_,
const ASTPtr & sharding_key_, const ASTPtr & sharding_key_,
const String & data_path_) const String & data_path_)
: name(name_), columns(columns_), : name(name_), columns(columns_),
...@@ -152,7 +152,7 @@ StorageDistributed::StorageDistributed( ...@@ -152,7 +152,7 @@ StorageDistributed::StorageDistributed(
const String & remote_database_, const String & remote_database_,
const String & remote_table_, const String & remote_table_,
const String & cluster_name_, const String & cluster_name_,
Context & context_, const Context & context_,
const ASTPtr & sharding_key_, const ASTPtr & sharding_key_,
const String & data_path_) const String & data_path_)
: IStorage{materialized_columns_, alias_columns_, column_defaults_}, : IStorage{materialized_columns_, alias_columns_, column_defaults_},
...@@ -177,7 +177,7 @@ StoragePtr StorageDistributed::create( ...@@ -177,7 +177,7 @@ StoragePtr StorageDistributed::create(
const String & remote_database_, const String & remote_database_,
const String & remote_table_, const String & remote_table_,
const String & cluster_name_, const String & cluster_name_,
Context & context_, const Context & context_,
const ASTPtr & sharding_key_, const ASTPtr & sharding_key_,
const String & data_path_) const String & data_path_)
{ {
...@@ -197,7 +197,7 @@ StoragePtr StorageDistributed::create( ...@@ -197,7 +197,7 @@ StoragePtr StorageDistributed::create(
const String & remote_database_, const String & remote_database_,
const String & remote_table_, const String & remote_table_,
ClusterPtr & owned_cluster_, ClusterPtr & owned_cluster_,
Context & context_) const Context & context_)
{ {
auto res = make_shared( auto res = make_shared(
name_, columns_, remote_database_, name_, columns_, remote_database_,
...@@ -450,7 +450,7 @@ BlockInputStreams StorageDistributed::describe(const Context & context, const Se ...@@ -450,7 +450,7 @@ BlockInputStreams StorageDistributed::describe(const Context & context, const Se
/** The functionality of shard_multiplexing is not completed - turn it off. /** The functionality of shard_multiplexing is not completed - turn it off.
* (Because connecting connections to different shards within a single thread is not done in parallel.) * (Because connecting connections to different shards within a single thread is not done in parallel.)
* For more information, see https: //███████████.yandex-team.ru/METR-18300 * For more information, see https://███████████.yandex-team.ru/METR-18300
*/ */
bool enable_shard_multiplexing = false; bool enable_shard_multiplexing = false;
......
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
const String & remote_database_, /// database on remote servers. const String & remote_database_, /// database on remote servers.
const String & remote_table_, /// The name of the table on the remote servers. const String & remote_table_, /// The name of the table on the remote servers.
const String & cluster_name, const String & cluster_name,
Context & context_, const Context & context_,
const ASTPtr & sharding_key_, const ASTPtr & sharding_key_,
const String & data_path_); const String & data_path_);
...@@ -51,7 +51,7 @@ public: ...@@ -51,7 +51,7 @@ public:
const String & remote_database_, /// database on remote servers. const String & remote_database_, /// database on remote servers.
const String & remote_table_, /// The name of the table on the remote servers. const String & remote_table_, /// The name of the table on the remote servers.
ClusterPtr & owned_cluster_, ClusterPtr & owned_cluster_,
Context & context_); const Context & context_);
std::string getName() const override { return "Distributed"; } std::string getName() const override { return "Distributed"; }
std::string getTableName() const override { return name; } std::string getTableName() const override { return name; }
...@@ -110,7 +110,7 @@ private: ...@@ -110,7 +110,7 @@ private:
const String & remote_database_, const String & remote_database_,
const String & remote_table_, const String & remote_table_,
const String & cluster_name_, const String & cluster_name_,
Context & context_, const Context & context_,
const ASTPtr & sharding_key_ = nullptr, const ASTPtr & sharding_key_ = nullptr,
const String & data_path_ = String{}); const String & data_path_ = String{});
...@@ -123,7 +123,7 @@ private: ...@@ -123,7 +123,7 @@ private:
const String & remote_database_, const String & remote_database_,
const String & remote_table_, const String & remote_table_,
const String & cluster_name_, const String & cluster_name_,
Context & context_, const Context & context_,
const ASTPtr & sharding_key_ = nullptr, const ASTPtr & sharding_key_ = nullptr,
const String & data_path_ = String{}); const String & data_path_ = String{});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册