ClickHouse/dbms/src/Processors/ISource.h

31 lines
513 B
C++
Raw Normal View History

#pragma once
#include <Processors/IProcessor.h>
namespace DB
{
class ISource : public IProcessor
{
protected:
OutputPort & output;
2019-02-07 18:51:53 +00:00
bool has_input = false;
bool finished = false;
[[maybe_unused]] bool got_exception = false;
2019-04-29 18:43:50 +00:00
Port::Data current_chunk;
virtual Chunk generate() = 0;
public:
ISource(Block header);
Status prepare() override;
void work() override;
OutputPort & getPort() { return output; }
2019-02-19 18:41:18 +00:00
const OutputPort & getPort() const { return output; }
};
}