1 | #include <Common/Exception.h> |
2 | |
3 | #include <Columns/ColumnsNumber.h> |
4 | #include <DataTypes/DataTypesNumber.h> |
5 | #include <DataStreams/OneBlockInputStream.h> |
6 | #include <Storages/System/StorageSystemOne.h> |
7 | |
8 | |
9 | namespace DB |
10 | { |
11 | |
12 | |
13 | StorageSystemOne::StorageSystemOne(const std::string & name_) |
14 | : name(name_) |
15 | { |
16 | setColumns(ColumnsDescription({{"dummy" , std::make_shared<DataTypeUInt8>()}})); |
17 | } |
18 | |
19 | |
20 | BlockInputStreams StorageSystemOne::read( |
21 | const Names & column_names, |
22 | const SelectQueryInfo &, |
23 | const Context & /*context*/, |
24 | QueryProcessingStage::Enum /*processed_stage*/, |
25 | const size_t /*max_block_size*/, |
26 | const unsigned /*num_streams*/) |
27 | { |
28 | check(column_names); |
29 | |
30 | return BlockInputStreams(1, std::make_shared<OneBlockInputStream>( |
31 | Block{ColumnWithTypeAndName( |
32 | DataTypeUInt8().createColumnConst(1, 0u)->convertToFullColumnIfConst(), |
33 | std::make_shared<DataTypeUInt8>(), |
34 | "dummy" )})); |
35 | } |
36 | |
37 | |
38 | } |
39 | |