mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
dbms: development [#CONV-2944].
This commit is contained in:
parent
5ee98f1937
commit
8498979724
@ -246,16 +246,16 @@ struct Range
|
|||||||
bool rightThan(const Field & x)
|
bool rightThan(const Field & x)
|
||||||
{
|
{
|
||||||
return (left_bounded
|
return (left_bounded
|
||||||
? !(boost::apply_visitor(FieldVisitorGreater(), x, left) || (left_included && x == left))
|
? !(boost::apply_visitor(FieldVisitorGreater(), x, left) || (left_included && x == left))
|
||||||
: false);
|
: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// x находится правее
|
/// x находится правее
|
||||||
bool leftThan(const Field & x)
|
bool leftThan(const Field & x)
|
||||||
{
|
{
|
||||||
return (right_bounded
|
return (right_bounded
|
||||||
? !(boost::apply_visitor(FieldVisitorLess(), x, right) || (right_included && x == right))
|
? !(boost::apply_visitor(FieldVisitorLess(), x, right) || (right_included && x == right))
|
||||||
: false);
|
: false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Пересекает отрезок
|
/// Пересекает отрезок
|
||||||
@ -266,8 +266,8 @@ struct Range
|
|||||||
if (!right_bounded)
|
if (!right_bounded)
|
||||||
return contains(segment_right);
|
return contains(segment_right);
|
||||||
|
|
||||||
return boost::apply_visitor(FieldVisitorLess(), segment_left, right) || (right_included && segment_left == right)
|
return (boost::apply_visitor(FieldVisitorLess(), segment_left, right) || (right_included && segment_left == right))
|
||||||
|| boost::apply_visitor(FieldVisitorGreater(), segment_right, left) || (left_included && segment_right == left);
|
&& (boost::apply_visitor(FieldVisitorGreater(), segment_right, left) || (left_included && segment_right == left));
|
||||||
}
|
}
|
||||||
|
|
||||||
String toString()
|
String toString()
|
||||||
|
Loading…
Reference in New Issue
Block a user