ClickHouse / ClickHouse/ClickHouse

groupArrayLast merge behaviour

Open
#48,022 0 comments 0 reactions 0 assignees View on GitHub
comp-aggregate-functions external feature
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

AggregatingMergeTree + groupArrayLast probably could store the last N inserted values.

But it does not work

```sql
select finalizeAggregation( groupArrayLastArrayState(3)([1,2,3]) + groupArrayLastArrayState(3)([4]) ) x;
┌─x───────┐
│ [4,2,3] │
└─────────┘
```

it would be nice to have another result:

```
┌─x───────┐
│ [2,3,4] │
└─────────┘
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.