mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
More simple code; fixed translation error [#CLICKHOUSE-2].
This commit is contained in:
parent
25209bf040
commit
0c416be381
@ -31,24 +31,13 @@ public:
|
||||
|
||||
bool operator<(const Part & rhs) const
|
||||
{
|
||||
if (month != rhs.month)
|
||||
return month < rhs.month;
|
||||
|
||||
if (left != rhs.left)
|
||||
return left < rhs.left;
|
||||
if (right != rhs.right)
|
||||
return right < rhs.right;
|
||||
|
||||
if (level != rhs.level)
|
||||
return level < rhs.level;
|
||||
|
||||
return false;
|
||||
return std::tie(month, left, right, level) < std::tie(rhs.month, rhs.left, rhs.right, rhs.level);
|
||||
}
|
||||
|
||||
/// Contains another part (obtained after combining another part with some other)
|
||||
/// Contains another part (obtained after merging another part with some other)
|
||||
bool contains(const Part & rhs) const
|
||||
{
|
||||
return month == rhs.month /// Parts for different months are not combined
|
||||
return month == rhs.month /// Parts for different months are not merged
|
||||
&& left_date <= rhs.left_date
|
||||
&& right_date >= rhs.right_date
|
||||
&& left <= rhs.left
|
||||
|
Loading…
Reference in New Issue
Block a user