(
exprs: impl IntoIterator<Item = &'a Expr>,
schema: &SchemaRef,
)
| 297 | use super::*; |
| 298 | |
| 299 | fn create_projection_exprs<'a>( |
| 300 | exprs: impl IntoIterator<Item = &'a Expr>, |
| 301 | schema: &SchemaRef, |
| 302 | ) -> ProjectionExprs { |
| 303 | let df_schema = DFSchema::try_from(Arc::clone(schema)).unwrap(); |
| 304 | let physical_exprs = |
| 305 | create_physical_exprs(exprs, &df_schema, &ExecutionProps::default()).unwrap(); |
| 306 | let projection_exprs = physical_exprs |
| 307 | .into_iter() |
| 308 | .enumerate() |
| 309 | .map(|(i, e)| ProjectionExpr::new(Arc::clone(&e), format!("col{i}"))) |
| 310 | .collect_vec(); |
| 311 | ProjectionExprs::from(projection_exprs) |
| 312 | } |
| 313 | |
| 314 | #[test] |
| 315 | fn test_split_projection_with_partition_columns() { |
searching dependent graphs…