Skip to content

proposal: groupArraySorted ?  #3708

@filimonov

Description

@filimonov

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions