mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
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; }
|
|
};
|
|
|
|
}
|