ClickHouse/src/Processors/ISink.h

30 lines
416 B
C++
Raw Normal View History

#pragma once
#include <Processors/IProcessor.h>
namespace DB
{
class ISink : public IProcessor
{
protected:
InputPort & input;
Chunk current_chunk;
bool has_input = false;
virtual void consume(Chunk block) = 0;
virtual void onFinish() {}
public:
2019-07-07 14:57:50 +00:00
explicit ISink(Block header);
Status prepare() override;
void work() override;
InputPort & getPort() { return input; }
};
}