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: add schema evolution to merge statement #3136

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

Conversation

JustinRush80
Copy link

Description

Add schema evolution (only merge) to the MERGE statement. New columns are added based on the columns predicates in the MERGE operations (eg. target.id = source.id). Using when_not_matched_insert_all and when_matched_update_all will add any new column to the target schema

Related Issue(s)

Documentation

@github-actions github-actions bot added binding/python Issues for the Python package binding/rust Issues for the Rust crate labels Jan 16, 2025
@JustinRush80 JustinRush80 marked this pull request as ready for review January 16, 2025 14:16
@ion-elgreco
Copy link
Collaborator

@JustinRush80 can you rebase your branch against main, or allow us to rebase it

I will do thorough review tomorrow then :)

@ion-elgreco
Copy link
Collaborator

@JustinRush80 could you rebase again, something went wrong since files changed is huge

Signed-off-by: JustinRush80 <69156844+JustinRush80@users.noreply.github.com>
Copy link

codecov bot commented Jan 18, 2025

Codecov Report

Attention: Patch coverage is 92.62899% with 30 lines in your changes missing coverage. Please review.

Project coverage is 72.27%. Comparing base (7d29885) to head (53042d8).

Files with missing lines Patch % Lines
crates/core/src/operations/merge/mod.rs 94.48% 2 Missing and 20 partials ⚠️
python/src/merge.rs 0.00% 6 Missing ⚠️
python/src/lib.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3136      +/-   ##
==========================================
+ Coverage   72.08%   72.27%   +0.18%     
==========================================
  Files         134      134              
  Lines       43360    43757     +397     
  Branches    43360    43757     +397     
==========================================
+ Hits        31258    31627     +369     
- Misses      10085    10094       +9     
- Partials     2017     2036      +19     

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

Signed-off-by: JustinRush80 <69156844+JustinRush80@users.noreply.github.com>
.unwrap()
.await
.unwrap();
assert_eq!(metrics.num_target_files_added, 2);
Copy link
Author

Choose a reason for hiding this comment

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

@ion-elgreco any ideas why this assert is failing in the Ci pipeline but passing locally?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you tried checking what the output is locally vs in the CI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/python Issues for the Python package binding/rust Issues for the Rust crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schema evolution on upsert (merge)
2 participants