mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #65689 from Algunenano/max_intersections_crash
Fix crash in maxIntersections
This commit is contained in:
commit
9f3433199b
@ -91,7 +91,8 @@ public:
|
||||
return std::make_shared<DataTypeNumber<PointType>>();
|
||||
}
|
||||
|
||||
bool allocatesMemoryInArena() const override { return false; }
|
||||
/// MaxIntersectionsData::Allocator uses the arena
|
||||
bool allocatesMemoryInArena() const override { return true; }
|
||||
|
||||
void add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena * arena) const override
|
||||
{
|
||||
|
@ -0,0 +1,8 @@
|
||||
1 3 3
|
||||
1 6 3
|
||||
2 5 3
|
||||
3 7 3
|
||||
1 3 2
|
||||
1 6 2
|
||||
2 5 2
|
||||
3 7 2
|
@ -0,0 +1,5 @@
|
||||
DROP TABLE IF EXISTS my_events;
|
||||
CREATE TABLE my_events (start UInt32, end UInt32) Engine = MergeTree ORDER BY tuple()
|
||||
AS Select * FROM VALUES ('start UInt32, end UInt32', (1, 3), (1, 6), (2, 5), (3, 7));
|
||||
SELECT start, end, maxIntersections(start, end) OVER () FROM my_events;
|
||||
SELECT start, end, maxIntersectionsPosition(start, end) OVER () FROM my_events;
|
Loading…
Reference in New Issue
Block a user