Skip to content

Conversation

renato2099
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

Window functions end up adding two columns

What changes are included in this PR?

Modified the with_column method to skip columns added by window functions as their aliased version is added anyway.

Are these changes tested?

Added a unit test asserting for the specific number of columns.

Are there any user-facing changes?

No

@github-actions github-actions bot added the core Core DataFusion crate label Sep 18, 2025
@renato2099
Copy link
Contributor Author

Hi @timsaucer ,

Could you please take a look whenever you have some spare cycles?
Thanks!

@alamb alamb changed the title (fix): 17630 (fix): Lag function creates unwanted projection (#17630) Sep 19, 2025
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.

Lag function creates unwanted projection
1 participant