Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
enumerate_grouping_sets in datafusion_expr::utils - Rust
[go: Go Back, main page]

Function enumerate_grouping_sets

Source
pub fn enumerate_grouping_sets(group_expr: Vec<Expr>) -> Result<Vec<Expr>>
Expand description

Convert multiple grouping expressions into one GroupingSet::GroupingSets,
if the grouping expression does not contain Expr::GroupingSet or only has one expression,
no conversion will be performed.

e.g.

person.id,
GROUPING SETS ((person.age, person.salary),(person.age)),
ROLLUP(person.state, person.birth_date)

=>

GROUPING SETS (
(person.id, person.age, person.salary),
(person.id, person.age, person.salary, person.state),
(person.id, person.age, person.salary, person.state, person.birth_date),
(person.id, person.age),
(person.id, person.age, person.state),
(person.id, person.age, person.state, person.birth_date)
)