pub fn pushdown_projections(
expression: Expression,
_dialect: Option<DialectType>,
remove_unused_selections: bool,
) -> ExpressionExpand description
Rewrite SQL AST to remove unused column projections.
§Example
-- Before:
SELECT y.a AS a FROM (SELECT x.a AS a, x.b AS b FROM x) AS y
-- After:
SELECT y.a AS a FROM (SELECT x.a AS a FROM x) AS y§Arguments
expression- The expression to optimizedialect- Optional dialect for dialect-specific behaviorremove_unused_selections- Whether to actually remove unused selections
§Returns
The optimized expression with unused projections removed