apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.82k stars 1.1k forks source link

Support Grouping functions with Group By CUBE/ROLLUP/GROUPING SETS #5647

Open mingmwang opened 1 year ago

mingmwang commented 1 year ago

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

PostgreSQL, SparkSQL and Oracle support using GROUPING functions to specify the null is from subtotal or from original data. https://www.postgresql.org/docs/15/functions-aggregate.html#FUNCTIONS-HYPOTHETICAL-TABLE

Databricks SparkSQL https://docs.databricks.com/sql/language-manual/functions/grouping.html

Oracle https://oracle-base.com/articles/misc/rollup-cube-grouping-functions-and-grouping-sets#grouping

Describe the solution you'd like

Describe alternatives you've considered

Additional context

mingmwang commented 1 year ago

I'm working on it now.

l1t1 commented 4 months ago

where is the document of these features?