-
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
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.53% +1.78%
- Complexity 207 1459 +1252
============================================
Files 2436 2760 +324
Lines 133233 155337 +22104
Branches 20636 23916 +3280
============================================
+ Hits 82274 98695 +16421
- Misses 44911 49189 +4278
- Partials 6048 7453 +1405
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 |
…manish-star/accept-null-overwrite
LGTM! cc @Jackie-Jiang @klsince in case you have any comments! |
.../src/main/java/org/apache/pinot/segment/local/upsert/merger/PartialUpsertColumnarMerger.java
Show resolved
Hide resolved
.../src/main/java/org/apache/pinot/segment/local/upsert/merger/PartialUpsertColumnarMerger.java
Show resolved
Hide resolved
.../src/main/java/org/apache/pinot/segment/local/upsert/merger/PartialUpsertColumnarMerger.java
Show resolved
Hide resolved
@Jackie-Jiang do the changes look good to go? |
Hi @deemoliu @tibrewalpratik17 @klsince .... can any one of you merge this PR please? |
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: