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(python): ensure join frame types are consistent #6798

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Feb 11, 2023

Closes #6264.

We shouldn't silently allow mixed frame types in join functions as it can promote lazy computations to eager mode, which may not be intentional - if not noticed, this could result in an unnecessary performance penalty for the caller.

  • Updates eager join and join_asof methods with the same check already found in their lazy counterparts.
  • Also, fixes the type of the raised exception (should be TypeError, not ValueError).

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Feb 11, 2023
@ritchie46
Copy link
Member

Totally agree!

@ritchie46 ritchie46 merged commit c3d91b9 into pola-rs:master Feb 11, 2023
@alexander-beedie alexander-beedie deleted the join-frame-consistency branch February 11, 2023 08:14
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFrame.join(LazyFrame) is allowed ?
2 participants