ClickHouse/src/Storages/StorageS3Cluster.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.4 KiB
C++
Raw Normal View History

2021-03-19 21:49:18 +00:00
#pragma once
#include "config.h"
2021-03-24 21:02:21 +00:00
#if USE_AWS_S3
2021-06-15 19:55:21 +00:00
#include <memory>
#include <optional>
2021-03-19 21:49:18 +00:00
#include "Client/Connection.h"
2021-04-08 00:09:15 +00:00
#include <Interpreters/Cluster.h>
#include <IO/S3Common.h>
#include <Storages/IStorageCluster.h>
2021-04-08 00:09:15 +00:00
#include <Storages/StorageS3.h>
2021-03-19 21:49:18 +00:00
namespace DB
{
class Context;
class StorageS3Cluster : public IStorageCluster
2021-03-19 21:49:18 +00:00
{
public:
2021-04-12 21:42:52 +00:00
StorageS3Cluster(
const String & cluster_name_,
const StorageS3::Configuration & configuration_,
2021-04-23 12:18:23 +00:00
const StorageID & table_id_,
const ColumnsDescription & columns_,
const ConstraintsDescription & constraints_,
ContextPtr context_,
bool structure_argument_was_provided_);
2021-03-19 21:49:18 +00:00
std::string getName() const override { return "S3Cluster"; }
NamesAndTypesList getVirtuals() const override;
RemoteQueryExecutor::Extension getTaskIteratorExtension(const ActionsDAG::Node * predicate, const ContextPtr & context) const override;
bool supportsSubcolumns() const override { return true; }
bool supportsTrivialCountOptimization() const override { return true; }
2023-03-28 13:39:59 +00:00
protected:
void updateConfigurationIfChanged(ContextPtr local_context);
2021-03-19 21:49:18 +00:00
private:
void updateBeforeRead(const ContextPtr & context) override { updateConfigurationIfChanged(context); }
void addColumnsStructureToQuery(ASTPtr & query, const String & structure, const ContextPtr & context) override;
StorageS3::Configuration s3_configuration;
2022-05-19 11:18:58 +00:00
NamesAndTypesList virtual_columns;
2021-03-19 21:49:18 +00:00
};
}
2021-03-24 21:02:21 +00:00
#endif