ClickHouse/src/Storages/MergeTree/MarkRange.h

36 lines
674 B
C++
Raw Normal View History

2015-06-24 11:03:53 +00:00
#pragma once
#include <cstddef>
#include <deque>
#include <set>
2015-06-24 11:03:53 +00:00
#include <IO/WriteBuffer.h>
2015-06-24 11:03:53 +00:00
namespace DB
{
2021-10-27 21:54:06 +00:00
/** A pair of marks that defines the range of rows in a part. Specifically,
* the range has the form [begin * index_granularity, end * index_granularity).
*/
2015-06-24 11:03:53 +00:00
struct MarkRange
{
ColumnConst unification (#1011) * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * Fixed error in ColumnArray::replicateGeneric [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150]. * ColumnConst: unification (incomplete) [#CLICKHOUSE-3150].
2017-07-21 06:35:58 +00:00
size_t begin;
size_t end;
2015-06-24 11:03:53 +00:00
MarkRange() = default;
2019-08-03 11:02:40 +00:00
MarkRange(const size_t begin_, const size_t end_) : begin{begin_}, end{end_} {}
bool operator==(const MarkRange & rhs) const;
bool operator<(const MarkRange & rhs) const;
2015-06-24 11:03:53 +00:00
};
using MarkRanges = std::deque<MarkRange>;
2015-06-24 11:03:53 +00:00
2021-10-27 21:54:06 +00:00
/** Get max range.end from ranges.
*/
size_t getLastMark(const MarkRanges & ranges);
2015-06-24 11:03:53 +00:00
}