mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
29 lines
576 B
C++
29 lines
576 B
C++
#pragma once
|
|
#include <Processors/ISink.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class IBlockOutputStream;
|
|
using BlockOutputStreamPtr = std::shared_ptr<IBlockOutputStream>;
|
|
|
|
/// Sink which writes data to IBlockOutputStream.
|
|
/// It's a temporary wrapper.
|
|
class SinkToOutputStream : public ISink
|
|
{
|
|
public:
|
|
explicit SinkToOutputStream(BlockOutputStreamPtr stream);
|
|
|
|
String getName() const override { return "SinkToOutputStream"; }
|
|
|
|
protected:
|
|
void consume(Chunk chunk) override;
|
|
void onFinish() override;
|
|
|
|
private:
|
|
BlockOutputStreamPtr stream;
|
|
bool initialized = false;
|
|
};
|
|
|
|
}
|