Recursively 'unnormalize' (remove all qualifiers) from an expression tree. For example, if there were expressions like `foo.bar` this would rewrite it to just `bar`.
(expr: Expr)
| 159 | /// For example, if there were expressions like `foo.bar` this would |
| 160 | /// rewrite it to just `bar`. |
| 161 | pub fn unnormalize_col(expr: Expr) -> Expr { |
| 162 | expr.transform(|expr| { |
| 163 | Ok({ |
| 164 | if let Expr::Column(c) = expr { |
| 165 | let col = Column::new_unqualified(c.name); |
| 166 | Transformed::yes(Expr::Column(col)) |
| 167 | } else { |
| 168 | Transformed::no(expr) |
| 169 | } |
| 170 | }) |
| 171 | }) |
| 172 | .data() |
| 173 | .expect("Unnormalize is infallible") |
| 174 | } |
| 175 | |
| 176 | /// Create a Column from the Scalar Expr |
| 177 | pub fn create_col_from_scalar_expr( |
no test coverage detected
searching dependent graphs…