Returns the `Expr`'s corresponding to a SQL query's SELECT expressions.
(
&self,
plan: &LogicalPlan,
projection: Vec<SelectItem>,
empty_from: bool,
planner_context: &mut PlannerContext,
)
| 785 | |
| 786 | /// Returns the `Expr`'s corresponding to a SQL query's SELECT expressions. |
| 787 | pub(crate) fn prepare_select_exprs( |
| 788 | &self, |
| 789 | plan: &LogicalPlan, |
| 790 | projection: Vec<SelectItem>, |
| 791 | empty_from: bool, |
| 792 | planner_context: &mut PlannerContext, |
| 793 | ) -> Result<Vec<SelectExpr>> { |
| 794 | let mut prepared_select_exprs = vec![]; |
| 795 | let mut error_builder = DataFusionErrorBuilder::new(); |
| 796 | |
| 797 | for expr in projection { |
| 798 | match self.sql_select_to_rex(expr, plan, empty_from, planner_context) { |
| 799 | Ok(expr) => prepared_select_exprs.push(expr), |
| 800 | Err(err) => error_builder.add_error(err), |
| 801 | } |
| 802 | } |
| 803 | error_builder.error_or(prepared_select_exprs) |
| 804 | } |
| 805 | |
| 806 | /// Generate a relational expression from a select SQL expression |
| 807 | fn sql_select_to_rex( |
no test coverage detected