mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
70d1adfe4b
* save format string for NetException * format exceptions * format exceptions 2 * format exceptions 3 * format exceptions 4 * format exceptions 5 * format exceptions 6 * fix * format exceptions 7 * format exceptions 8 * Update MergeTreeIndexGin.cpp * Update AggregateFunctionMap.cpp * Update AggregateFunctionMap.cpp * fix
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "config.h"
|
|
|
|
#if USE_MYSQL
|
|
|
|
#include <Storages/StorageProxy.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
namespace ErrorCodes
|
|
{
|
|
extern const int NOT_IMPLEMENTED;
|
|
}
|
|
|
|
class StorageMaterializedMySQL final : public StorageProxy
|
|
{
|
|
public:
|
|
StorageMaterializedMySQL(const StoragePtr & nested_storage_, const IDatabase * database_);
|
|
|
|
String getName() const override { return "MaterializedMySQL"; }
|
|
|
|
bool needRewriteQueryWithFinal(const Names & column_names) const override;
|
|
|
|
void read(
|
|
QueryPlan & query_plan,
|
|
const Names & column_names,
|
|
const StorageSnapshotPtr & metadata_snapshot,
|
|
SelectQueryInfo & query_info,
|
|
ContextPtr context,
|
|
QueryProcessingStage::Enum processed_stage,
|
|
size_t max_block_size, size_t num_streams) override;
|
|
|
|
SinkToStoragePtr write(const ASTPtr &, const StorageMetadataPtr &, ContextPtr) override { throwNotAllowed(); }
|
|
|
|
NamesAndTypesList getVirtuals() const override;
|
|
ColumnSizeByName getColumnSizes() const override;
|
|
|
|
StoragePtr getNested() const override { return nested_storage; }
|
|
|
|
void drop() override { nested_storage->drop(); }
|
|
|
|
private:
|
|
[[noreturn]] static void throwNotAllowed()
|
|
{
|
|
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "This method is not allowed for MaterializedMySQL");
|
|
}
|
|
|
|
StoragePtr nested_storage;
|
|
const IDatabase * database;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|