#pragma once #include #include #include namespace DB { class IMergeSelector { public: struct Part { size_t size; time_t age; unsigned level; const void * data; }; using PartsInPartition = std::vector; using Partitions = std::vector; using CanMergePart = std::function; using CanMergeAdjacent = std::function; virtual PartsInPartition select( const Partitions & partitions, CanMergePart can_merge_part, CanMergeAdjacent can_merge_adjacent, const size_t max_total_size_to_merge, bool aggressive_mode) = 0; virtual ~IMergeSelector() {} }; }