Skip to content

support GROUP BY modifiers #4250

Closed
Closed
@zz-jason

Description

Request Description

MySQL and Oracle support ROLLUP modifier, SQL Server also supports CUBE and GROUPING SETS

References:

An example in MySQL:

drop table if exists t;
create table t(a bigint, b bigint, c bigint);
insert into t values(1, 2, 3), (2, 2, 3), (3, 2, 3);
MySQL > select a, min(b) from t group by a with rollup;
+------+--------+
| a    | min(b) |
+------+--------+
|    1 |      2 |
|    2 |      2 |
|    3 |      2 |
| NULL |      2 |
+------+--------+
4 rows in set (0.01 sec)

Category

Feature

Value

  • Value Point: 2

It's hard to tell the value for now. Quoted from https://docs.oracle.com/cd/F49540_01/DOC/server.815/a68003/rollup_c.htm:

One of the key concepts in decision support systems is "multi-dimensional analysis": examining the enterprise from all necessary combinations of dimensions. We use the term "dimension" to mean any category used in specifying questions. Among the most commonly specified dimensions are time, geography, product, department, and distribution channel, but the potential dimensions are as endless as the varieties of enterprise activity. The events or entities associated with a particular set of dimension values are usually referred to as "facts." The facts may be sales in units or local currency, profits, customer counts, production volumes, or anything else worth tracking.

I think the value of this request is to improve the usability and performance in Business Intelligence(BI) scenarios. No need to run several aggregate queries to get another level aggregate result. I'm curious about whether are some BI tools rely on this feature.

Workload Estimation

Workload contains coding, documenting, and testing.
1 Point for 1 Person/Work Day

  • 60 Points, hard to say, most modifications are on the aggregate operator in execution engine.

Activity

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

Metadata

Assignees

Labels

feature/acceptedThis feature request is accepted by product managershelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.sig/executionSIG executiontype/feature-requestCategorizes issue or PR as related to a new feature.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions