mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
|
#pragma once
|
||
|
|
||
|
#include "config.h"
|
||
|
|
||
|
#include <memory>
|
||
|
#include <optional>
|
||
|
|
||
|
#include <Client/Connection.h>
|
||
|
#include <Interpreters/Cluster.h>
|
||
|
#include <Storages/IStorageCluster.h>
|
||
|
#include <Storages/StorageURL.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
class Context;
|
||
|
|
||
|
class StorageURLCluster : public IStorageCluster
|
||
|
{
|
||
|
public:
|
||
|
StorageURLCluster(
|
||
|
ContextPtr context_,
|
||
|
String cluster_name_,
|
||
|
const String & uri_,
|
||
|
const StorageID & table_id_,
|
||
|
const String & format_name_,
|
||
|
const ColumnsDescription & columns_,
|
||
|
const ConstraintsDescription & constraints_,
|
||
|
const String & compression_method_,
|
||
|
const StorageURL::Configuration &configuration_);
|
||
|
|
||
|
std::string getName() const override { return "URLCluster"; }
|
||
|
|
||
|
Pipe read(const Names &, const StorageSnapshotPtr &, SelectQueryInfo &,
|
||
|
ContextPtr, QueryProcessingStage::Enum, size_t /*max_block_size*/, size_t /*num_streams*/) override;
|
||
|
|
||
|
QueryProcessingStage::Enum
|
||
|
getQueryProcessingStage(ContextPtr, QueryProcessingStage::Enum, const StorageSnapshotPtr &, SelectQueryInfo &) const override;
|
||
|
|
||
|
NamesAndTypesList getVirtuals() const override;
|
||
|
|
||
|
ClusterPtr getCluster(ContextPtr context) const override;
|
||
|
RemoteQueryExecutor::Extension getTaskIteratorExtension(ASTPtr query, ContextPtr context) const override;
|
||
|
|
||
|
private:
|
||
|
String cluster_name;
|
||
|
String uri;
|
||
|
String format_name;
|
||
|
String compression_method;
|
||
|
bool add_columns_structure_to_query = false;
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
}
|
||
|
|