1#pragma once
2
3#include <DataStreams/IBlockOutputStream.h>
4
5
6namespace DB
7{
8
9class Block;
10class StorageMergeTree;
11
12
13class MergeTreeBlockOutputStream : public IBlockOutputStream
14{
15public:
16 MergeTreeBlockOutputStream(StorageMergeTree & storage_, size_t max_parts_per_block_)
17 : storage(storage_), max_parts_per_block(max_parts_per_block_) {}
18
19 Block getHeader() const override;
20 void write(const Block & block) override;
21
22private:
23 StorageMergeTree & storage;
24 size_t max_parts_per_block;
25};
26
27}
28