#pragma once
#include
#include
#include
#include
#include
#include
namespace DB
{
class MergeTreeData;
/// Auxiliary struct holding metainformation for the future merged or mutated part.
struct FutureMergedMutatedPart
{
String name;
UUID uuid = UUIDHelpers::Nil;
String path;
MergeTreeDataPartFormat part_format;
MergeTreePartInfo part_info;
MergeTreeData::DataPartsVector parts;
MergeType merge_type = MergeType::Regular;
const MergeTreePartition & getPartition() const { return parts.front()->partition; }
FutureMergedMutatedPart() = default;
explicit FutureMergedMutatedPart(MergeTreeData::DataPartsVector parts_)
{
assign(std::move(parts_));
}
FutureMergedMutatedPart(MergeTreeData::DataPartsVector parts_, MergeTreeDataPartFormat future_part_format)
{
assign(std::move(parts_), future_part_format);
}
void assign(MergeTreeData::DataPartsVector parts_);
void assign(MergeTreeData::DataPartsVector parts_, MergeTreeDataPartFormat future_part_format);
void updatePath(const MergeTreeData & storage, const IReservation * reservation);
};
using FutureMergedMutatedPartPtr = std::shared_ptr;
}