1 | #pragma once |
---|---|
2 | |
3 | #include <DataStreams/IBlockOutputStream.h> |
4 | |
5 | |
6 | namespace DB |
7 | { |
8 | |
9 | class Block; |
10 | class StorageMergeTree; |
11 | |
12 | |
13 | class MergeTreeBlockOutputStream : public IBlockOutputStream |
14 | { |
15 | public: |
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 | |
22 | private: |
23 | StorageMergeTree & storage; |
24 | size_t max_parts_per_block; |
25 | }; |
26 | |
27 | } |
28 |