ClickHouse/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.h

35 lines
1.2 KiB
C++
Raw Normal View History

2019-10-16 18:27:53 +00:00
#include <Storages/MergeTree/IMergeTreeDataPartWriter.h>
namespace DB
{
2019-10-22 10:50:17 +00:00
class MergeTreeDataPartWriterCompact : public IMergeTreeDataPartWriter
2019-10-16 18:27:53 +00:00
{
public:
2019-10-22 10:50:17 +00:00
MergeTreeDataPartWriterCompact(
const String & part_path,
const MergeTreeData & storage,
const NamesAndTypesList & columns_list,
const String & marks_file_extension,
const CompressionCodecPtr & default_codec,
const WriterSettings & settings);
2019-10-22 17:42:59 +00:00
MarkWithOffset write(const Block & block, const IColumn::Permutation * permutation,
2019-10-31 14:44:17 +00:00
size_t from_mark, size_t index_offset, MergeTreeIndexGranularity & index_granularity,
2019-10-28 11:00:29 +00:00
const Block & primary_key_block, const Block & skip_indexes_block,
bool skip_offsets = false, const WrittenOffsetColumns & already_written_offset_columns = {}) override;
2019-10-16 18:27:53 +00:00
2019-10-22 17:42:59 +00:00
void finalize(IMergeTreeDataPart::Checksums & checksums, bool write_final_mark, bool sync = false) override;
2019-10-21 17:23:06 +00:00
private:
2019-10-16 18:27:53 +00:00
/// Write single granule of one column (rows between 2 marks)
size_t writeColumnSingleGranule(
const ColumnWithTypeAndName & column,
size_t from_row,
size_t number_of_rows);
2019-10-21 17:23:06 +00:00
2019-10-21 00:28:29 +00:00
ColumnStreamPtr stream;
2019-10-16 18:27:53 +00:00
};
2019-10-21 15:33:59 +00:00
}