2023-01-19 02:19:04 +00:00
|
|
|
#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_,
|
2023-04-24 13:20:04 +00:00
|
|
|
const String & cluster_name_,
|
|
|
|
const String & uri_,
|
|
|
|
const String & format_,
|
|
|
|
const String & compression_method_,
|
2023-01-19 02:19:04 +00:00
|
|
|
const StorageID & table_id_,
|
|
|
|
const ColumnsDescription & columns_,
|
|
|
|
const ConstraintsDescription & constraints_,
|
2023-04-21 17:54:09 +00:00
|
|
|
const StorageURL::Configuration & configuration_,
|
2023-01-21 01:33:37 +00:00
|
|
|
bool structure_argument_was_provided_);
|
2023-01-19 02:19:04 +00:00
|
|
|
|
|
|
|
std::string getName() const override { return "URLCluster"; }
|
|
|
|
|
|
|
|
NamesAndTypesList getVirtuals() const override;
|
|
|
|
|
2023-05-12 13:58:45 +00:00
|
|
|
RemoteQueryExecutor::Extension getTaskIteratorExtension(ASTPtr query, const ContextPtr & context) const override;
|
2023-01-19 02:19:04 +00:00
|
|
|
|
|
|
|
private:
|
2023-05-12 13:58:45 +00:00
|
|
|
void addColumnsStructureToQuery(ASTPtr & query, const String & structure, const ContextPtr & context) override;
|
2023-01-19 02:19:04 +00:00
|
|
|
|
2023-04-24 13:20:04 +00:00
|
|
|
String uri;
|
|
|
|
String format_name;
|
|
|
|
String compression_method;
|
2023-01-19 02:19:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|