We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d010ce9 commit 591f246Copy full SHA for 591f246
datafusion/expr/src/logical_plan/builder.rs
@@ -1531,7 +1531,12 @@ pub fn wrap_projection_for_join_if_necessary(
1531
1532
let need_project = join_keys.iter().any(|key| !matches!(key, Expr::Column(_)));
1533
let plan = if need_project {
1534
- let mut projection = expand_wildcard(input_schema, &input, None)?;
+ // Include all columns from the input and extend them with the join keys
1535
+ let mut projection = input_schema
1536
+ .columns()
1537
+ .into_iter()
1538
+ .map(Expr::Column)
1539
+ .collect::<Vec<_>>();
1540
let join_key_items = alias_join_keys
1541
.iter()
1542
.flat_map(|expr| expr.try_as_col().is_none().then_some(expr))
0 commit comments