-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Sometimes DF uses 2 schema sources, which is schema from previous node and current like in example(s) below.
Would be nice to check if we can use only 1 schema, multiple schemas are usually confusing
I agree it doesn't make sense -- however, it is the same logic as in `with_new_exprs`:
datafusion/datafusion/expr/src/logical_plan/plan.rs
Lines 913 to 925 in fad16e7
| LogicalPlan::Union(Union { schema, .. }) => { | |
| let input_schema = inputs[0].schema(); | |
| // If inputs are not pruned do not change schema. | |
| let schema = if schema.fields().len() == input_schema.fields().len() { | |
| schema.clone() | |
| } else { | |
| input_schema.clone() | |
| }; | |
| Ok(LogicalPlan::Union(Union { | |
| inputs: inputs.into_iter().map(Arc::new).collect(), | |
| schema, | |
| })) | |
| } |
Originally posted by @alamb in #10405 (comment)
Metadata
Metadata
Assignees
Labels
No labels