Support limiting sub-groups to top N
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 1.5k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 189
Description
In Elasticsearch we can do a group by gender, and then sub-group in each gender by state, and sum a metric, and get the top 10 results (for that sum of that metric) per state.
There doesn't seem to be a way to currently do that in Pinot, though @kishoreg suggested it would be possible via a UDF (let's call it "subBuckets"), something like `select , subBuckets(, , ) from group by `. For example:
``` sql
select gender, subBuckets(sum(billed_expenses), state, 10) from medicare_expenses group by gender
```
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by examining Pinot's support for grouped aggregations and the proposed subBuckets SQL shape; done means the example query can return the top 10 metric results within each gender and state grouping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, java, sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100