HaoYang670 commented on code in PR #4753:
URL: https://github.com/apache/arrow-datafusion/pull/4753#discussion_r1059232866
##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -773,12 +773,19 @@ impl DefaultPhysicalPlanner {
)?;
Ok(Arc::new(FilterExec::try_new(runtime_expr,
physical_input)?))
}
- LogicalPlan::Union(Union { inputs, .. }) => {
+ LogicalPlan::Union(Union { inputs, schema }) => {
let physical_plans = futures::stream::iter(inputs)
.then(|lp| self.create_initial_plan(lp, session_state))
.try_collect::<Vec<_>>()
.await?;
- Ok(Arc::new(UnionExec::new(physical_plans)))
+ if schema.fields().len() <
physical_plans[0].schema().fields().len() {
Review Comment:
Hmm, after double thinking, I am uncertain whether it is correct to ignore
the top level schema when generating physical plans. It would lose the
information about type coercion and metadata.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]