mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
blank for system.graphite
This commit is contained in:
parent
8fde017951
commit
1e13e68028
38
dbms/include/DB/Storages/System/StorageSystemGraphite.h
Normal file
38
dbms/include/DB/Storages/System/StorageSystemGraphite.h
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <DB/Storages/IStorage.h>
|
||||
#include <ext/shared_ptr_helper.hpp>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
class StorageSystemGraphite
|
||||
: private ext::shared_ptr_helper<StorageSystemGraphite>
|
||||
, public IStorage
|
||||
{
|
||||
friend class ext::shared_ptr_helper<StorageSystemGraphite>;
|
||||
|
||||
public:
|
||||
static StoragePtr create(const std::string & name_);
|
||||
|
||||
std::string getName() const override { return "SystemGraphite"; }
|
||||
std::string getTableName() const override { return name; }
|
||||
const NamesAndTypesList & getColumnsListImpl() const override { return columns; }
|
||||
|
||||
BlockInputStreams read(
|
||||
const Names & column_names,
|
||||
ASTPtr query,
|
||||
const Context & context,
|
||||
const Settings & settings,
|
||||
QueryProcessingStage::Enum & processed_stage,
|
||||
size_t max_block_size = DEFAULT_BLOCK_SIZE,
|
||||
unsigned threads = 1) override;
|
||||
|
||||
private:
|
||||
const std::string name;
|
||||
NamesAndTypesList columns;
|
||||
|
||||
StorageSystemGraphite(const std::string & name_);
|
||||
};
|
||||
|
||||
}
|
35
dbms/src/Storages/System/StorageSystemGraphite.cpp
Normal file
35
dbms/src/Storages/System/StorageSystemGraphite.cpp
Normal file
@ -0,0 +1,35 @@
|
||||
#include <DB/Storages/System/StorageSystemGraphite.h>
|
||||
|
||||
#include <DB/Columns/ColumnString.h>
|
||||
#include <DB/DataTypes/DataTypeString.h>
|
||||
#include <DB/DataTypes/DataTypesNumberFixed.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
StorageSystemGraphite::StorageSystemGraphite(const std::string & name_)
|
||||
: name(name_)
|
||||
, columns {
|
||||
{"metric", std::make_shared<DataTypeString>()},
|
||||
{"value", std::make_shared<DataTypeInt64>()}}
|
||||
{
|
||||
}
|
||||
|
||||
StoragePtr StorageSystemGraphite::create(const std::string & name_)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BlockInputStreams StorageSystemGraphite::read(
|
||||
const Names & column_names,
|
||||
ASTPtr query,
|
||||
const Context & context,
|
||||
const Settings & settings,
|
||||
QueryProcessingStage::Enum & processed_stage,
|
||||
size_t max_block_size,
|
||||
unsigned threads)
|
||||
{
|
||||
return BlockInputStreams();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user