-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Enable force overwrite for partial upserts #15107
base: master
Are you sure you want to change the base?
Enable force overwrite for partial upserts #15107
Conversation
if (newRow.isNullValue(column)) { | ||
resultHolder.put(column, prevValue); | ||
} else { | ||
resultHolder.put(column, merger.merge(prevValue, newRow.getValue(column))); | ||
} | ||
resultHolder.put(column, merger.merge(prevValue, newRow.getValue(column))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is backward-incompatible. Going through the attached issue, I would recommend to create a new merger strategy and allow null-overwrites there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15107 +/- ##
============================================
+ Coverage 61.75% 63.42% +1.67%
- Complexity 207 1482 +1275
============================================
Files 2436 2749 +313
Lines 133233 154451 +21218
Branches 20636 23817 +3181
============================================
+ Hits 82274 97964 +15690
- Misses 44911 49088 +4177
- Partials 6048 7399 +1351
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Pls update the documentation also with this. |
Hey @himanish-star the solution looks good to me! Can you please add unit-test / integration-test for your change too? |
Sure, I'll add today |
Yes, I'll add documentation mentioning the new config value to be set |
added unit tests |
@tibrewalpratik17 I've tested locally using |
Fixes #14924
This PR removes the logic that stops
prev column value
to be overwritten bynew column value
if the new value isNULL
.Before:
After: