Open atris opened 2 years ago
I have started working on this and aim to publish a design document by end of this week
Hi @atris . This looks like a super powerful feature. thanks for working on this.
on the higher level, would you please describe briefly the scope of this design? specifically
thanks in advance.
Not sure if this is similar / overlapping but linking the issue here for reference - https://github.com/apache/pinot/issues/8040
Looking forward to the design doc
This issue tracks the development of the feature that brings multiple grouping sets to Pinot.
What is A Grouping Set?
Consider the following query:
(brand, segment) represents a single grouping set.
A query using multiple grouping sets would be represented as:
An equivalent query using UNION ALL would be:
GROUPING SETS also allows empty sets () which is equivalent of SELECT * FROM foo;
CUBE and ROLLUP
CUBE(c1, c2, c3)
generates:ROLLUP(c1, c2,c3)
generates:ROLLUP generates groups in hierarchy vs. CUBE generating all groups.
Design
A design document shall soon be published but the design theme will be to use the swim lane concept introduced in the FILTER PR. An important design goal is to avoid rescans.
Implementation Plan
The implementation plan will be to first support ROLLUP, then CUBE and then generic GROUPING sets.