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

feat(python): Add merge mode to write_delta and remove pyarrow to delta conversions #12392

Merged
merged 9 commits into from
Dec 6, 2023

Conversation

ion-elgreco
Copy link
Contributor

@ion-elgreco ion-elgreco commented Nov 12, 2023

Closes #11983

@stinodego it's ready to review, but I keep it in DRAFT because we should merge it with main after the functionality of this PR: delta-io/delta-rs#1820 lands in the new release of deltalake, since the schema conversions directly in polars become obsolete.

Once it's available I will update this PR to pin the new version of deltalake.

@ion-elgreco ion-elgreco changed the title feat(python) expose MERGE in write_delta and remove pyarrow to delta conversions feat(python): expose MERGE in write_delta and remove pyarrow to delta conversions Nov 12, 2023
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars labels Nov 12, 2023
@stinodego stinodego added the do not merge This pull requests should not be merged right now label Nov 12, 2023
@stinodego stinodego changed the title feat(python): expose MERGE in write_delta and remove pyarrow to delta conversions feat(python): Add merge mode to write_delta and remove pyarrow to delta conversions Nov 12, 2023
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

A few quick comments - I will review more thoroughly when I can actually run the code (e.g. when new deltalake release is out).

py-polars/polars/dataframe/frame.py Outdated Show resolved Hide resolved
py-polars/polars/dataframe/frame.py Show resolved Hide resolved
py-polars/polars/dataframe/frame.py Outdated Show resolved Hide resolved
py-polars/polars/dataframe/frame.py Show resolved Hide resolved
@stinodego
Copy link
Member

All right, just ping me when this is ready for another look.

@ion-elgreco ion-elgreco marked this pull request as ready for review December 5, 2023 18:14
@ion-elgreco ion-elgreco requested a review from stinodego December 5, 2023 18:28
@stinodego stinodego force-pushed the feat/add_merge_in_write_delta branch from 4c4687c to 0dc5d3a Compare December 6, 2023 10:31
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

I rebased this as it was outdated.

This needs some tests for the merge mode, then it can be merged.

@ion-elgreco ion-elgreco force-pushed the feat/add_merge_in_write_delta branch from 2ed0aed to 0dc5d3a Compare December 6, 2023 10:47
@ion-elgreco
Copy link
Contributor Author

@stinodego added a test and your suggestion

@ion-elgreco ion-elgreco requested a review from stinodego December 6, 2023 11:05
@stinodego stinodego removed the do not merge This pull requests should not be merged right now label Dec 6, 2023
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! Happy to get rid of the pyarrow conversion logic and let deltalake handle that 👍

@ion-elgreco
Copy link
Contributor Author

Great, thanks @stinodego!

@stinodego stinodego merged commit 026377c into pola-rs:main Dec 6, 2023
14 checks passed
@ion-elgreco ion-elgreco deleted the feat/add_merge_in_write_delta branch December 6, 2023 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support merge operation for Delta tables
2 participants