LiaCastaneda commented on code in PR #16454:
URL: https://github.com/apache/datafusion/pull/16454#discussion_r2183276668
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -3795,37 +3796,58 @@ impl Join {
})
}
- /// Create Join with input which wrapped with projection, this method is
used to help create physical join.
+ /// Create Join with input which wrapped with projection, this method is
used in physcial planning only to help
+ /// create the physical join.
pub fn try_new_with_project_input(
original: &LogicalPlan,
left: Arc<LogicalPlan>,
right: Arc<LogicalPlan>,
column_on: (Vec<Column>, Vec<Column>),
- ) -> Result<Self> {
+ ) -> Result<(Self, bool)> {
let original_join = match original {
LogicalPlan::Join(join) => join,
_ => return plan_err!("Could not create join with project input"),
};
+ let mut left_sch = LogicalPlanBuilder::from(Arc::clone(&left));
+ let mut right_sch = LogicalPlanBuilder::from(Arc::clone(&right));
+
+ let mut requalified = false;
+
+ // By definition, the resulting schema of an inner join will have
first the left side fields and then the right,
+ // potentially having duplicate field names. Note this will only
qualify fields if they have not been qualified before.
+ // TODO: handle left and right joins as well.
+ if original_join.join_type == JoinType::Inner {
Review Comment:
yeah I left a `TODO` comment, but I was not sure if to address it on this
same PR, This will apply for left, inner, right & full joins I believe. I will
give it a try now 👍
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]