nsivabalan commented on code in PR #14116:
URL: https://github.com/apache/hudi/pull/14116#discussion_r2441416529
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieWriterUtils.scala:
##########
@@ -205,6 +206,18 @@ object HoodieWriterUtils {
&& value.equals(classOf[OverwriteWithLatestAvroPayload].getName)
&&
tableConfig.getString(HoodieTableConfig.PAYLOAD_CLASS_NAME.key()).equals(classOf[DefaultHoodieRecordPayload].getName))
{
true
+ } else if (tableVersion.greaterThanOrEquals(HoodieTableVersion.NINE)) {
+ // For >= v9, if the merge mode is not custom, we can skip payload
class check since the payload class
+ // is ignored during writes. Meanwhile, we should give a warning
about this behavior.
+ val recordMergeMode =
tableConfig.getStringOrDefault(HoodieTableConfig.RECORD_MERGE_MODE.key(), "")
+ if (!recordMergeMode.equals(CUSTOM.name)) {
Review Comment:
we can combine both `if` clauses into just 1
```
if (!recordMergeMode.equals(CUSTOM.name) && if
(!StringUtils.isNullOrEmpty(value)) {
.
.
.
}
```
--
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]