1 | #pragma once |
2 | #include <Processors/IProcessor.h> |
3 | |
4 | namespace DB |
5 | { |
6 | |
7 | class IInflatingTransform : public IProcessor |
8 | { |
9 | protected: |
10 | InputPort & input; |
11 | OutputPort & output; |
12 | |
13 | Chunk current_chunk; |
14 | bool has_input = false; |
15 | bool generated = false; |
16 | bool can_generate = false; |
17 | |
18 | virtual void consume(Chunk chunk) = 0; |
19 | virtual bool canGenerate() = 0; |
20 | virtual Chunk generate() = 0; |
21 | |
22 | public: |
23 | IInflatingTransform(Block , Block ); |
24 | |
25 | Status prepare() override; |
26 | void work() override; |
27 | |
28 | InputPort & getInputPort() { return input; } |
29 | OutputPort & getOutputPort() { return output; } |
30 | }; |
31 | |
32 | } |
33 | |