1 | #include <Storages/IStorage.h> |
2 | #include <Storages/ColumnsDescription.h> |
3 | #include <Storages/StorageValues.h> |
4 | #include <DataStreams/OneBlockInputStream.h> |
5 | |
6 | |
7 | namespace DB |
8 | { |
9 | |
10 | StorageValues::StorageValues(const std::string & database_name_, const std::string & table_name_, const ColumnsDescription & columns_, const Block & res_block_) |
11 | : database_name(database_name_), table_name(table_name_), res_block(res_block_) |
12 | { |
13 | setColumns(columns_); |
14 | } |
15 | |
16 | BlockInputStreams StorageValues::read( |
17 | const Names & column_names, |
18 | const SelectQueryInfo & /*query_info*/, |
19 | const Context & /*context*/, |
20 | QueryProcessingStage::Enum /*processed_stage*/, |
21 | size_t /*max_block_size*/, |
22 | unsigned /*num_streams*/) |
23 | { |
24 | check(column_names, true); |
25 | |
26 | return BlockInputStreams(1, std::make_shared<OneBlockInputStream>(res_block)); |
27 | } |
28 | |
29 | } |
30 | |