opensearch-project / opensearch-project/sql
[FEATURE] Support pushdown `collect/array_agg` aggregation
@LantaoJin is already working on this.
Since Jan 26, 2026.
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
Is your feature request related to a problem?
https://github.com/opensearch-project/sql/pull/5025 introduces a new Calcite Aggregation COLLECT:
LogicalAggregate(group=[{0, 1}], age=[COLLECT($2) FILTER $3])
or
LogicalAggregate(group=[{0, 1}], packets_str=[ARRAY_AGG($2) FILTER $3])
Currently, PPL doesn't support pushdown a COLLECT aggregation to DSL, instead, it will be planned to EnumerableAggregate(group=[{0, 1}], age=[COLLECT($2) FILTER $3]).
or
EnumerableAggregate(group=[{0, 1}], packets_str=[ARRAY_AGG($2) FILTER $3])
What solution would you like?
Pushdown Aggregation COLLECT to TopHits aggregation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.