Skip to content

Commit 591f246

Browse files
committed
replace expand_wildcard
1 parent d010ce9 commit 591f246

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

datafusion/expr/src/logical_plan/builder.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,12 @@ pub fn wrap_projection_for_join_if_necessary(
15311531

15321532
let need_project = join_keys.iter().any(|key| !matches!(key, Expr::Column(_)));
15331533
let plan = if need_project {
1534-
let mut projection = expand_wildcard(input_schema, &input, None)?;
1534+
// 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<_>>();
15351540
let join_key_items = alias_join_keys
15361541
.iter()
15371542
.flat_map(|expr| expr.try_as_col().is_none().then_some(expr))

0 commit comments

Comments
 (0)