2014-03-13 12:48:07 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <DataStreams/IBlockOutputStream.h>
|
2014-03-13 12:48:07 +00:00
|
|
|
|
2016-10-24 02:02:37 +00:00
|
|
|
|
2014-03-13 12:48:07 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-06-25 00:01:10 +00:00
|
|
|
class Block;
|
|
|
|
class StorageMergeTree;
|
|
|
|
|
|
|
|
|
2014-03-13 12:48:07 +00:00
|
|
|
class MergeTreeBlockOutputStream : public IBlockOutputStream
|
|
|
|
{
|
|
|
|
public:
|
2019-08-03 11:02:40 +00:00
|
|
|
MergeTreeBlockOutputStream(StorageMergeTree & storage_, size_t max_parts_per_block_)
|
|
|
|
: storage(storage_), max_parts_per_block(max_parts_per_block_) {}
|
2014-03-13 12:48:07 +00:00
|
|
|
|
2018-02-19 00:45:32 +00:00
|
|
|
Block getHeader() const override;
|
2017-06-25 00:01:10 +00:00
|
|
|
void write(const Block & block) override;
|
2014-03-13 12:48:07 +00:00
|
|
|
|
|
|
|
private:
|
2017-04-01 07:20:54 +00:00
|
|
|
StorageMergeTree & storage;
|
2019-03-29 09:33:39 +00:00
|
|
|
size_t max_parts_per_block;
|
2014-03-13 12:48:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|