1#pragma once
2
3#include <Processors/IProcessor.h>
4
5
6namespace DB
7{
8
9class ISink : public IProcessor
10{
11protected:
12 InputPort & input;
13 Chunk current_chunk;
14 bool has_input = false;
15
16 virtual void consume(Chunk block) = 0;
17
18public:
19 explicit ISink(Block header);
20
21 Status prepare() override;
22 void work() override;
23
24 InputPort & getPort() { return input; }
25};
26
27}
28