[WIP] [HUDI-834] Concrete signature of HoodieRecordPayload#combineAndGetUpdateValue & HoodieRecordPayload#getInsertValue#1557
Conversation
…ateValue & HoodieRecordPayload#getInsertValue
Codecov Report
@@ Coverage Diff @@
## master #1557 +/- ##
============================================
- Coverage 72.35% 71.69% -0.67%
Complexity 294 294
============================================
Files 374 378 +4
Lines 16377 16549 +172
Branches 1650 1670 +20
============================================
+ Hits 11849 11864 +15
- Misses 3797 3954 +157
Partials 731 731
Continue to review full report at Codecov.
|
|
Hold if |
|
+1, LGTM |
vinothchandar
left a comment
There was a problem hiding this comment.
Marking this as WIP for further discussion.. Thanks @tisonkun for taking a pass at this..
It's an user facing API.. we cannot break it.. We could introduce something new MergeHooks and still respect the Payload class if that's doable.. say.. Need to think more deeply
|
Closing with a WIP tag for future follow up. |
What is the purpose of the pull request
So far, the return type of HoodieRecordPayload#combineAndGetUpdateValue & HoodieRecordPayload#getInsertValue is effectively Option. Instead of doing unchecked cast at
org/apache/hudi/hadoop/realtime/RealtimeCompactedRecordReader.java:88
I propose we use Option as the return type of these two method, which replaces current Option.
FYI, I encounter this ticket when trying to get rid of self type parameter in HoodieRecordPayload and found that it is a bit awkward if we don't take a self type while doing this casting. Fortunately it is the fact that we can directly concrete it.
cc @vinothchandar @leesf
Verify this pull request
This pull request is code refactor should be covered by existing tests.
Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green