Create schema fields from an expression list, for use in result set schema construction This function converts a list of expressions into a list of complete schema fields, making comprehensive determinations about each field's properties including: - **Data type**: Resolved based on expression type and input schema context - **Nullability**: Determined by expression-specific nullability rules - *
(
exprs: impl IntoIterator<Item = &'a Expr>,
plan: &LogicalPlan,
)
| 753 | /// where each Field contains complete schema information (type, nullability, metadata) |
| 754 | /// and proper table reference scoping for the corresponding expression. |
| 755 | pub fn exprlist_to_fields<'a>( |
| 756 | exprs: impl IntoIterator<Item = &'a Expr>, |
| 757 | plan: &LogicalPlan, |
| 758 | ) -> Result<Vec<(Option<TableReference>, Arc<Field>)>> { |
| 759 | // Look for exact match in plan's output schema |
| 760 | let input_schema = plan.schema(); |
| 761 | exprs |
| 762 | .into_iter() |
| 763 | .map(|e| e.to_field(input_schema)) |
| 764 | .collect() |
| 765 | } |
| 766 | |
| 767 | /// Convert an expression into Column expression if it's already provided as input plan. |
| 768 | /// |
no test coverage detected
searching dependent graphs…