mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 12:32:04 +00:00
30 lines
416 B
C++
30 lines
416 B
C++
#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:
|
|
explicit ISink(Block header);
|
|
|
|
Status prepare() override;
|
|
void work() override;
|
|
|
|
InputPort & getPort() { return input; }
|
|
};
|
|
|
|
}
|