Skip to content

minor: with_inputs() can use original schema. - #6824

Closed
jackwener wants to merge 2 commits into
apache:mainfrom
jackwener:agg
Closed

minor: with_inputs() can use original schema.#6824
jackwener wants to merge 2 commits into
apache:mainfrom
jackwener:agg

Conversation

@jackwener

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #.

Rationale for this change

following #6820

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actionsgithub-actionsBot added logical-expr Logical plan and expressions core Core DataFusion crate labels Jul 2, 2023
Comment on lines -1242 to -1245
let input_schema = DFSchema::new_with_metadata(
exprlist_to_fields(&projected_expr, &plan)?,
plan.schema().metadata().clone(),
)?;

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it already was contained by try_new_with_schema, so we can use try_new_with_schema directly

})
.collect::<Vec<_>>();
let projection =
logical_plan::Projection::try_new_with_schema(

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we shouldn't use join_schema, because join_schema may contain some column which don't exist in project schema

@jackwener
jackwener requested a review from alambJuly 2, 2023 14:41
@jackwener

Copy link
Copy Markdown
MemberAuthor

``

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coreCore DataFusion cratelogical-exprLogical plan and expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@jackwener