Convert any `Expr` to an `Expr::Column`.
(expr: &Expr, plan: &LogicalPlan)
| 821 | |
| 822 | /// Convert any `Expr` to an `Expr::Column`. |
| 823 | pub fn expr_as_column_expr(expr: &Expr, plan: &LogicalPlan) -> Result<Expr> { |
| 824 | match expr { |
| 825 | Expr::Column(col) => { |
| 826 | let (qualifier, field) = plan.schema().qualified_field_from_column(col)?; |
| 827 | Ok(Expr::from(Column::from((qualifier, field)))) |
| 828 | } |
| 829 | _ => Ok(Expr::Column(Column::from_name( |
| 830 | expr.schema_name().to_string(), |
| 831 | ))), |
| 832 | } |
| 833 | } |
| 834 | |
| 835 | /// Recursively walk an expression tree, collecting the column indexes |
| 836 | /// referenced in the expression |
no test coverage detected
searching dependent graphs…