1 | #pragma once |
---|---|
2 | #include <Processors/ISource.h> |
3 | |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | class SourceFromSingleChunk : public ISource |
9 | { |
10 | public: |
11 | explicit SourceFromSingleChunk(Block header, Chunk chunk_) : ISource(std::move(header)), chunk(std::move(chunk_)) {} |
12 | String getName() const override { return "SourceFromSingleChunk"; } |
13 | |
14 | protected: |
15 | Chunk generate() override { return std::move(chunk); } |
16 | |
17 | private: |
18 | Chunk chunk; |
19 | }; |
20 | |
21 | } |
22 |