nsivabalan opened a new pull request, #13623: URL: https://github.com/apache/hudi/pull/13623
### Change Logs - Unifying Partial Update Modes from TableProperty and Merge Into Partial Update Encoding. - Fixed all of partial update handling within BufferedRecordMergerFactory. - Fixed Partial update encoding(Merge Into support) support across all record formats (prior to this patch only spark record was supported). Detailed changes: W/ the revised design, possible values for table property PartialUpdateMode: IGNORE_DEFAULTS, FILL_UNAVAILABLE, KEEP_VALUES. And there is no default value for PartialUpdateMode. In other words, for table's not having such partial update requirement, we may not find any value for `PartialUpdateMode` in table property. Note on "KEEP_VALUES": This may not be present in table properties, but will take effect when Partial columns are encoded via spark sql Merge Into. When invoking the BufferedRecordMerge to assist with merging, we could expect this to be set. Hence within BufferedRecordMergerFacotry.create(), we take in two arguments named `enablePartialEncoding` and `Option<PartialUpdateMode>`. `enablePartialEncoding` boolean flag will denote whether is full record merging or not. If enabled, the value set for PartialUpdateMode should be honored for merging semantics. Below table might help give a good picture of how table property and MIT partial encoding will come together: |Merge Mode | Table Property: hoodie.table.partial.update.mode | Writer | BufferedRecordMerger : enablePartialEncoding | BufferedRecordMerger: Option < PartialUpdateMode > |---|---|---|-----|---| event time | not set | spark-ds | false | Option.empty() | event time | not set | Merge Into | true | KEEP_VALUES | event time | IGNORE_DEFAULTS | spark-ds | true | IGNORE_DEFAULTS | event time| IGNORE_DEFAULTS | Merge Into | true | IGNORE_DEFAULTS| I took over https://github.com/apache/hudi/pull/13540/ from Lin and made fixes on top. Pending: Unless we land get the fix landed for https://issues.apache.org/jira/browse/HUDI-9638 these new PartialUpdateModes are not taking effect for end to end functional tests. Also, we need to add more tests directly against BufferedRecordMerger class. ### Impact - Cleaning up PartialUpdateMode feature and unifying MergeInto partial update encoding along with other PartialUpdateModes from table config. ### Risk level (write none, low medium or high below) medium ### Documentation Update _Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none"._ - _The config description must be updated if new configs are added or the default value of the configs are changed_ - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make changes to the website._ ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Change Logs and Impact were stated clearly - [ ] Adequate tests were added if applicable - [ ] CI passed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
