mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Update AggregateFunctionMaxIntersections.h
This commit is contained in:
parent
218a282f88
commit
d1eac37389
@ -137,10 +137,8 @@ public:
|
||||
/// const_cast because we will sort the array
|
||||
auto & array = const_cast<typename MaxIntersectionsData<PointType>::Array &>(this->data(place).value);
|
||||
|
||||
std::sort(array.begin(), array.end(), [](const auto & a, const auto & b) {
|
||||
return (a.first < b.first) || //sort by position ascending
|
||||
((a.first == b.first) && (a.second < b.second)); //sort by weight ascending
|
||||
});
|
||||
/// Sort by position; for equal position, sort by weight to get deterministic result.
|
||||
std::sort(array.begin(), array.end());
|
||||
|
||||
for (const auto & point_weight : array)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user