mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 21:03:51 +00:00
42 lines
1.0 KiB
C++
42 lines
1.0 KiB
C++
#include <Common/Exception.h>
|
|
|
|
#include <Columns/ColumnsNumber.h>
|
|
#include <DataTypes/DataTypesNumber.h>
|
|
#include <DataStreams/OneBlockInputStream.h>
|
|
#include <Storages/System/StorageSystemOne.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
|
|
StorageSystemOne::StorageSystemOne(const std::string & name_)
|
|
: name(name_), columns{{"dummy", std::make_shared<DataTypeUInt8>()}}
|
|
{
|
|
}
|
|
|
|
|
|
BlockInputStreams StorageSystemOne::read(
|
|
const Names & column_names,
|
|
const SelectQueryInfo &,
|
|
const Context &,
|
|
QueryProcessingStage::Enum & processed_stage,
|
|
const size_t /*max_block_size*/,
|
|
const unsigned /*num_streams*/)
|
|
{
|
|
check(column_names);
|
|
processed_stage = QueryProcessingStage::FetchColumns;
|
|
|
|
Block block;
|
|
ColumnWithTypeAndName col;
|
|
col.name = "dummy";
|
|
col.type = std::make_shared<DataTypeUInt8>();
|
|
col.column = DataTypeUInt8().createColumnConst(1, UInt64(0))->convertToFullColumnIfConst();
|
|
block.insert(std::move(col));
|
|
|
|
return BlockInputStreams(1, std::make_shared<OneBlockInputStream>(block));
|
|
}
|
|
|
|
|
|
}
|