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

refactor: dataframe join params #912

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ion-elgreco
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

Many times join keys are the same in both dataframes, so a simple on suffices. Also join_keys are deprecated over left_on and right_on.

What changes are included in this PR?

  • marks join_keys as deprecated
  • introduces on, left_on, right_on parameters
  • adds function overloads

Are there any user-facing changes?

  • new params added, join_keys deprecated.

@ion-elgreco ion-elgreco changed the title refactor: dataframe join params refactor: dataframe join params Oct 13, 2024
Copy link
Contributor

@timsaucer timsaucer left a comment

Choose a reason for hiding this comment

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

This looks like a good improvement.

python/datafusion/dataframe.py Show resolved Hide resolved
@ion-elgreco
Copy link
Contributor Author

This looks like a good improvement.

Any other changes still needed?

@timsaucer
Copy link
Contributor

None that I can see. I'll run the workflow and as long as it all passes, I'll merge it later today

@timsaucer
Copy link
Contributor

Thank you!

@timsaucer
Copy link
Contributor

It looks like we do have some problems in pytests

@ion-elgreco
Copy link
Contributor Author

@timsaucer Ah my bad, we need to add this at the end of the function, then it should run:

if isinstance(left_on,str):
    left_on=[left_on]
if isinstance(right_on,str):
    right_on=[right_on]

Can't add it now myself to test :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants