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
33 lines
541 B
C++
33 lines
541 B
C++
#pragma once
|
|
|
|
#include <Processors/IProcessor.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class ISource : public IProcessor
|
|
{
|
|
protected:
|
|
OutputPort & output;
|
|
bool has_input = false;
|
|
bool finished = false;
|
|
bool got_exception = false;
|
|
Port::Data current_chunk;
|
|
|
|
virtual Chunk generate() = 0;
|
|
|
|
public:
|
|
ISource(Block header);
|
|
|
|
Status prepare() override;
|
|
void work() override;
|
|
|
|
OutputPort & getPort() { return output; }
|
|
const OutputPort & getPort() const { return output; }
|
|
};
|
|
|
|
using SourcePtr = std::shared_ptr<ISource>;
|
|
|
|
}
|