You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "linliu-code (via GitHub)" <gi...@apache.org> on 2025/10/17 20:59:06 UTC

[PR] fix: Skip payload class validation when merge mode is not custom [hudi]

linliu-code opened a new pull request, #14116:
URL: https://github.com/apache/hudi/pull/14116

   ### Describe the issue this Pull Request addresses
   
   When the payload class configured during the write is different from the one from table config, the payload class validation fails the write.
   When merge mode is either `event_time` or `commit_time` based, the merge behavior is not impacted by the payload class configured. Therefore, we can relax the validation constraints to ignore the payload class configuration when the merge mode is not custom.
   
   ### Summary and Changelog
   
   When the table version is >= 9, and the merge mode is not custom, we skip the payload class validation.
   
   ### Impact
   
   Better user experience.
   
   ### Risk Level
   
   None.
   
   ### 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 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)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #14116:
URL: https://github.com/apache/hudi/pull/14116#discussion_r2441417317


##########
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 rename `value` into `incomingPayloadClass` to make it convey the actual meaning



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418717689

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238",
       "triggerID" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9239",
       "triggerID" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 44fdeb1e7f16c50c799f278092e66cf7e3a73a02 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238) 
   * 1802b43988692220fcc5aabc21ea6e400362d9d3 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9239) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418563344

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fdb1ebe916e83bf677a2b83162e6bc9440caa6ba Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225) 
   * 5c977c82643288981cc51377e8b33ee9059ef2d2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418767951

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238",
       "triggerID" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9239",
       "triggerID" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1802b43988692220fcc5aabc21ea6e400362d9d3 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9239) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418672941

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238",
       "triggerID" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5c977c82643288981cc51377e8b33ee9059ef2d2 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237) 
   * 44fdeb1e7f16c50c799f278092e66cf7e3a73a02 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238) 
   * 1802b43988692220fcc5aabc21ea6e400362d9d3 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418671141

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5c977c82643288981cc51377e8b33ee9059ef2d2 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237) 
   * 44fdeb1e7f16c50c799f278092e66cf7e3a73a02 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418565793

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fdb1ebe916e83bf677a2b83162e6bc9440caa6ba Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225) 
   * 5c977c82643288981cc51377e8b33ee9059ef2d2 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418674750

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238",
       "triggerID" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1802b43988692220fcc5aabc21ea6e400362d9d3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 44fdeb1e7f16c50c799f278092e66cf7e3a73a02 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238) 
   * 1802b43988692220fcc5aabc21ea6e400362d9d3 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "linliu-code (via GitHub)" <gi...@apache.org>.
linliu-code commented on code in PR #14116:
URL: https://github.com/apache/hudi/pull/14116#discussion_r2442458262


##########
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:
   Done.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418672052

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238",
       "triggerID" : "44fdeb1e7f16c50c799f278092e66cf7e3a73a02",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5c977c82643288981cc51377e8b33ee9059ef2d2 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237) 
   * 44fdeb1e7f16c50c799f278092e66cf7e3a73a02 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9238) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on code in PR #14116:
URL: https://github.com/apache/hudi/pull/14116#discussion_r2441418715


##########
hudi-spark-datasource/hudi-spark-common/src/test/java/org/apache/hudi/TestHoodieWriterUtils.java:
##########
@@ -116,4 +121,44 @@ void testFallbackToOriginalKey() {
     String result = HoodieWriterUtils.getKeyInTableConfig("my.custom.key", config);
     assertEquals("my.custom.key", result);
   }
+
+  @Test
+  void testShouldIgnorePayloadValidationVersion9WithCustomMergeMode() {

Review Comment:
   minor 
   `ShouldNotIgnore...` 



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3418634726

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     }, {
       "hash" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237",
       "triggerID" : "5c977c82643288981cc51377e8b33ee9059ef2d2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 5c977c82643288981cc51377e8b33ee9059ef2d2 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9237) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3419701343

   github action is failing due to unrelated failure. going ahead w/ landing.
   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3417197361

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fdb1ebe916e83bf677a2b83162e6bc9440caa6ba Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3417188744

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fdb1ebe916e83bf677a2b83162e6bc9440caa6ba UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #14116:
URL: https://github.com/apache/hudi/pull/14116#issuecomment-3417438280

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225",
       "triggerID" : "fdb1ebe916e83bf677a2b83162e6bc9440caa6ba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fdb1ebe916e83bf677a2b83162e6bc9440caa6ba Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=9225) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "linliu-code (via GitHub)" <gi...@apache.org>.
linliu-code commented on code in PR #14116:
URL: https://github.com/apache/hudi/pull/14116#discussion_r2442459335


##########
hudi-spark-datasource/hudi-spark-common/src/test/java/org/apache/hudi/TestHoodieWriterUtils.java:
##########
@@ -116,4 +121,44 @@ void testFallbackToOriginalKey() {
     String result = HoodieWriterUtils.getKeyInTableConfig("my.custom.key", config);
     assertEquals("my.custom.key", result);
   }
+
+  @Test
+  void testShouldIgnorePayloadValidationVersion9WithCustomMergeMode() {

Review Comment:
   This is the function name under test. The following parameter should implies its behavior.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix: Skip payload class validation when merge mode is not custom [hudi]

Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan merged PR #14116:
URL: https://github.com/apache/hudi/pull/14116


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org