MCPcopy Create free account
hub / github.com/apache/datafusion / sql_grouping_sets_to_expr

Method sql_grouping_sets_to_expr

datafusion/sql/src/expr/grouping_set.rs:25–40  ·  view source on GitHub ↗
(
        &self,
        exprs: Vec<Vec<SQLExpr>>,
        schema: &DFSchema,
        planner_context: &mut PlannerContext,
    )

Source from the content-addressed store, hash-verified

23
24impl<S: ContextProvider> SqlToRel<'_, S> {
25 pub(super) fn sql_grouping_sets_to_expr(
26 &self,
27 exprs: Vec<Vec<SQLExpr>>,
28 schema: &DFSchema,
29 planner_context: &mut PlannerContext,
30 ) -> Result<Expr> {
31 let args: Result<Vec<Vec<_>>> = exprs
32 .into_iter()
33 .map(|v| {
34 v.into_iter()
35 .map(|e| self.sql_expr_to_logical_expr(e, schema, planner_context))
36 .collect()
37 })
38 .collect();
39 Ok(Expr::GroupingSet(GroupingSet::GroupingSets(args?)))
40 }
41
42 pub(super) fn sql_rollup_to_expr(
43 &self,

Callers 1

Calls 5

GroupingSetEnum · 0.85
collectMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected