Function mz_sql::plan::query::plan_group_by_expr
source ยท fn plan_group_by_expr<'a>(
ecx: &ExprContext<'_>,
group_expr: &'a Expr<Aug>,
projection: &'a [(ExpandedSelectItem<'_>, ColumnName)],
) -> Result<(Option<&'a Expr<Aug>>, HirScalarExpr), PlanError>
Expand description
Plans an expression in a GROUP BY
clause.
For historical reasons, PostgreSQL allows GROUP BY
expressions to refer to
names/expressions defined in the SELECT
clause. These special cases are
handled by this function; see comments within the implementation for
details.