databendlabs/databend

Feature: add list function like duckdb

Open

#10,497 opened on Mar 11, 2023

View on GitHub
 (7 comments) (0 reactions) (1 assignee)Rust (880 forks)github user discovery
C-featuregood first issue

Repository metrics

Stars
 (9,314 stars)
PR merge metrics
 (Avg merge 4d 18h) (99 merged PRs in 30d)

Description

Summary list(a) fill rows of column a into a list/array also support group by and order by eg.

D select list(i)from range(10)t(i);
┌────────────────────────────────┐
│            list(i)             │
│            int64[]             │
├────────────────────────────────┤
│ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] │
└────────────────────────────────┘
D select i%3,list(i)from range(10)t(i)group by i%3;
┌─────────┬──────────────┐
│ (i % 3) │   list(i)    │
│  int64  │   int64[]    │
├─────────┼──────────────┤
│       0 │ [0, 3, 6, 9] │
│       1 │ [1, 4, 7]    │
│       2 │ [2, 5, 8]    │
└─────────┴──────────────┘

Contributor guide