mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-11 02:50:50 +00:00
30 lines
588 B
C++
30 lines
588 B
C++
|
#pragma once
|
||
|
#include <Processors/ISource.h>
|
||
|
#include <DataStreams/IBlockInputStream.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
class IBlockInputStream;
|
||
|
using BlockInputStreamPtr = std::shared_ptr<IBlockInputStream>;
|
||
|
|
||
|
class SourceFromInputStream : public ISource
|
||
|
{
|
||
|
public:
|
||
|
SourceFromInputStream(Block header, BlockInputStreamPtr stream);
|
||
|
|
||
|
|
||
|
String getName() const override { return "SourceFromInputStream"; }
|
||
|
|
||
|
Chunk generate() override;
|
||
|
|
||
|
BlockInputStreamPtr & getStream() { return stream; }
|
||
|
|
||
|
private:
|
||
|
bool initialized = false;
|
||
|
bool finished = false;
|
||
|
BlockInputStreamPtr stream;
|
||
|
};
|
||
|
|
||
|
}
|