ClickHouse/src/Storages/MergeTree/LevelMergeSelector.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
581 B
C++
Raw Normal View History

#pragma once
#include <Storages/MergeTree/MergeSelector.h>
namespace DB
{
/** Select parts to merge based on its level.
* Select first range of parts of parts_to_merge length with minimum level.
*/
class LevelMergeSelector : public IMergeSelector
{
public:
struct Settings
{
size_t parts_to_merge = 10;
};
2019-08-03 11:02:40 +00:00
explicit LevelMergeSelector(const Settings & settings_) : settings(settings_) {}
2020-09-03 13:29:18 +00:00
PartsRange select(
const PartsRanges & parts_ranges,
size_t max_total_size_to_merge) override;
private:
const Settings settings;
};
}