Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix DuplicateError when selecting columns after join_where or cross join + filter #20865

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

nameexhaustion
Copy link
Collaborator

@nameexhaustion nameexhaustion commented Jan 23, 2025

*Update - what this PR does is not correct, it is superceded by #21067

Fixes #20831

We have had this issue for queries in the form .join(.., how='cross').filter(..).select(..) for quite a while (since version 1.8.2).

c
@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jan 23, 2025
@nameexhaustion nameexhaustion changed the title fix: Error selecting columns after join_where or cross join + filter fix: DuplicateError when selecting columns after join_where or cross join + filter Jan 23, 2025
@@ -197,10 +197,6 @@ impl ExprIR {
self.output_name = OutputName::Alias(name)
}

pub(crate) fn set_columnlhs(&mut self, name: PlSmallStr) {
self.output_name = OutputName::ColumnLhs(name)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a very evil function 😭

Copy link
Member

Choose a reason for hiding this comment

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

Wow, yes. The expression remain unchanged. :S

@nameexhaustion nameexhaustion changed the title fix: DuplicateError when selecting columns after join_where or cross join + filter fix: Fix DuplicateError when selecting columns after join_where or cross join + filter Jan 23, 2025
@nameexhaustion nameexhaustion marked this pull request as ready for review January 23, 2025 11:04
@ritchie46 ritchie46 merged commit 3c6ac14 into pola-rs:main Jan 23, 2025
33 checks passed
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.64%. Comparing base (b333ab7) to head (dd53bea).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20865      +/-   ##
==========================================
- Coverage   79.64%   79.64%   -0.01%     
==========================================
  Files        1571     1571              
  Lines      223165   223186      +21     
  Branches     2546     2554       +8     
==========================================
+ Hits       177737   177751      +14     
- Misses      44844    44850       +6     
- Partials      584      585       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selecting columns from LazyFrame after join_where fails with DuplicateError
2 participants