Skip to content

Conversation

@timsaucer
Copy link
Member

Which issue does this PR close?

Closes #12425

Rationale for this change

The current implementation regresses when you have multiple columns without a qualifier and the new with_column is a window function. This is because the loop is checking for any field to not have a qualifier.

What changes are included in this PR?

Check the display name of the expr in the schema matches that of the window function that was added.

Are these changes tested?

Updated unit test

Are there any user-facing changes?

None

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

The code ane test makes sense to me. Thank you @timsaucer

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @timsaucer

@comphead comphead merged commit 13dc8a6 into apache:main Sep 11, 2024
24 checks passed
@timsaucer timsaucer deleted the tsaucer/with_column_window_fix branch October 10, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling with_column twice generates an error when the second call uses a window function

4 participants