-
Notifications
You must be signed in to change notification settings - Fork 8.3k
proposal: groupArraySorted ? #3708
Copy link
Copy link
Closed
Labels
Description
there is already groupArray, there is also arraySort, merging of two sorted arrays is O(n+m) operation.
Is it possible to implement groupArraySorted? And also with limit? With limit it should be efficient even on very big datasets.
It could be used to solve 'take fist/last N elements in each group' / lastpoint -alike tasks in selects and incrementally in materialized view (with AggregatingMergeTree).
Reactions are currently unavailable