Rewrite sort expressions that have a UNION plan as their input to remove the table reference.
(exprs: Vec<SortExpr>)
| 84 | |
| 85 | /// Rewrite sort expressions that have a UNION plan as their input to remove the table reference. |
| 86 | fn rewrite_sort_expr_for_union(exprs: Vec<SortExpr>) -> Result<Vec<SortExpr>> { |
| 87 | let sort_exprs = exprs |
| 88 | .map_elements(&mut |expr: Expr| { |
| 89 | expr.transform_up(|expr| { |
| 90 | if let Expr::Column(mut col) = expr { |
| 91 | col.relation = None; |
| 92 | Ok(Transformed::yes(Expr::Column(col))) |
| 93 | } else { |
| 94 | Ok(Transformed::no(expr)) |
| 95 | } |
| 96 | }) |
| 97 | }) |
| 98 | .data()?; |
| 99 | |
| 100 | Ok(sort_exprs) |
| 101 | } |
| 102 | |
| 103 | /// Rewrite Filter plans that have a Window as their input by inserting a SubqueryAlias. |
| 104 | /// |
no test coverage detected
searching dependent graphs…