ClickHouse/src/Processors/ISink.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
522 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;
2021-07-26 14:47:29 +00:00
bool was_on_start_called = false;
2021-07-23 14:25:35 +00:00
bool was_on_finish_called = false;
virtual void consume(Chunk block) = 0;
2021-07-26 14:47:29 +00:00
virtual void onStart() {}
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; }
};
}