alamb commented on code in PR #11713:
URL: https://github.com/apache/datafusion/pull/11713#discussion_r1700383150


##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -1532,13 +1531,28 @@ pub fn wrap_projection_for_join_if_necessary(
     let need_project = join_keys.iter().any(|key| !matches!(key, 
Expr::Column(_)));
     let plan = if need_project {
         let mut projection = expand_wildcard(input_schema, &input, None)?;
+        // #11635 when we are dealing with join, and the children schema has 
diffrencens with join schema,

Review Comment:
   ```suggestion
           // #11635 when we are dealing with join, and the children schema has 
differences with join schema,
   ```



##########
datafusion/expr/src/logical_plan/builder.rs:
##########
@@ -1507,6 +1505,7 @@ fn table_source(table_schema: &Schema) -> Arc<dyn 
TableSource> {
 pub fn wrap_projection_for_join_if_necessary(
     join_keys: &[Expr],
     input: LogicalPlan,
+    upper_exprs: &[&Expr],

Review Comment:
   Could you please add some documentation about what this parameter is being 
used for? 
   
   For example, it seems like it represents the expressions required by the 
parent join. And the change is that this function ensures that all expressions 
in `upper_exprs` are included in the output `LogicalPlan`?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to