Skip to content

feat: add 'array_agg', 'max_by' function#5748

Draft
sunyeongchoi wants to merge 3 commits intoPRQL:mainfrom
AhnLab-OSSG:feature/prql-function
Draft

feat: add 'array_agg', 'max_by' function#5748
sunyeongchoi wants to merge 3 commits intoPRQL:mainfrom
AhnLab-OSSG:feature/prql-function

Conversation

@sunyeongchoi
Copy link
Copy Markdown
Contributor

Issue #5747

array_agg

  • Aggregates column values into an array
from tracks
aggregate {names = array_agg name}

max_by

  • Returns the row with the maximum value for a specified column
from tracks
aggregate {longest_name = max_by name milliseconds}

@sunyeongchoi sunyeongchoi force-pushed the feature/prql-function branch from 778d5f1 to 44a2648 Compare March 27, 2026 05:27
@sunyeongchoi sunyeongchoi marked this pull request as draft March 27, 2026 08:11
@snth
Copy link
Copy Markdown
Member

snth commented Mar 27, 2026

Hi @sunyeongchoi ,

Thank you for the PRs! I'm busy catching up on resolving some of the stale PRs and then will hopefully get to reviewing these soon.

@sunyeongchoi sunyeongchoi force-pushed the feature/prql-function branch from 64338b9 to 8124cbf Compare March 27, 2026 08:43
@sunyeongchoi sunyeongchoi marked this pull request as ready for review March 27, 2026 08:43
@sunyeongchoi sunyeongchoi marked this pull request as draft March 27, 2026 08:50
@max-sixty
Copy link
Copy Markdown
Member

the array functions require much more thought and language design. I think we can add functions for scalar functions, but we should not add array functions through this process

hope that's OK @sunyeongchoi ! I would welcome more scalar functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants