Concrete signature of HoodieRecordPayload#combineAndGetUpdateValue & HoodieRecordPayload#getInsertValue
- Dominant language
- Java
- Stars
- 6.2k
- Forks
- 2.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 111
Description
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 [~vinoth] [~leesf]
## JIRA info
- Link: https://issues.apache.org/jira/browse/HUDI-834
- Type: Improvement
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with HoodieRecordPayload#combineAndGetUpdateValue and #getInsertValue, then inspect the unchecked cast at org/apache/hudi/hadoop/realtime/RealtimeCompactedRecordReader.java:88. Confirm how changing both methods from Option to Option affects their callers, and consider the work done when the signatures are concrete and the cast is no longer needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100