ClickHouse/dbms/Storages/MergeTree/MergeTreeBlockOutputStream.h

28 lines
514 B
C++
Raw Normal View History

2014-03-13 12:48:07 +00:00
#pragma once
#include <DataStreams/IBlockOutputStream.h>
2014-03-13 12:48:07 +00:00
2014-03-13 12:48:07 +00:00
namespace DB
{
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
Block getHeader() const override;
void write(const Block & block) override;
2014-03-13 12:48:07 +00:00
private:
StorageMergeTree & storage;
size_t max_parts_per_block;
2014-03-13 12:48:07 +00:00
};
}