ClickHouse/dbms/src/Storages/System/StorageSystemOne.cpp

42 lines
1.0 KiB
C++
Raw Normal View History

#include <Common/Exception.h>
2011-08-28 02:22:23 +00:00
#include <Columns/ColumnsNumber.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataStreams/OneBlockInputStream.h>
#include <Storages/System/StorageSystemOne.h>
2011-08-28 02:22:23 +00:00
namespace DB
{
StorageSystemOne::StorageSystemOne(const std::string & name_)
: name(name_), columns{{"dummy", std::make_shared<DataTypeUInt8>()}}
2011-08-28 02:22:23 +00:00
{
}
2012-01-09 19:20:48 +00:00
BlockInputStreams StorageSystemOne::read(
const Names & column_names,
2017-12-02 02:47:12 +00:00
const SelectQueryInfo &,
const Context &,
QueryProcessingStage::Enum & processed_stage,
2017-12-02 02:47:12 +00:00
const size_t /*max_block_size*/,
const unsigned /*num_streams*/)
2011-08-28 02:22:23 +00:00
{
check(column_names);
processed_stage = QueryProcessingStage::FetchColumns;
2012-05-08 11:19:00 +00:00
Block block;
ColumnWithTypeAndName col;
col.name = "dummy";
col.type = std::make_shared<DataTypeUInt8>();
ColumnConst unification (#1011) * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * Fixed error in ColumnArray::replicateGeneric [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].
2017-07-21 06:35:58 +00:00
col.column = DataTypeUInt8().createConstColumn(1, UInt64(0))->convertToFullColumnIfConst();
block.insert(std::move(col));
return BlockInputStreams(1, std::make_shared<OneBlockInputStream>(block));
2011-08-28 02:22:23 +00:00
}
}