ClickHouse/dbms/src/Processors/Sources/SourceFromInputStream.h

28 lines
593 B
C++
Raw Normal View History

2019-03-26 18:28:37 +00:00
#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;
2019-04-05 11:27:08 +00:00
bool stream_finished = false;
2019-03-26 18:28:37 +00:00
BlockInputStreamPtr stream;
};
}