You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/04/25 16:33:34 UTC

[GitHub] [hudi] alexeykudinkin commented on a diff in pull request #5424: [HUDI-3972] Fixing hoodie.properties/tableConfig for no preCombine field with writes

alexeykudinkin commented on code in PR #5424:
URL: https://github.com/apache/hudi/pull/5424#discussion_r857820290


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -151,7 +154,7 @@ object HoodieSparkSqlWriter {
           .setBaseFileFormat(baseFileFormat)
           .setArchiveLogFolder(archiveLogFolder)
           .setPayloadClassName(hoodieConfig.getString(PAYLOAD_CLASS_NAME))
-          .setPreCombineField(hoodieConfig.getStringOrDefault(PRECOMBINE_FIELD, null))
+          .setPreCombineField(optParams.getOrElse(PRECOMBINE_FIELD.key(), null))

Review Comment:
   Shouldn't similar change be applied for other `hoodieConfig` accesses in this scope? 



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -151,7 +154,7 @@ object HoodieSparkSqlWriter {
           .setBaseFileFormat(baseFileFormat)
           .setArchiveLogFolder(archiveLogFolder)
           .setPayloadClassName(hoodieConfig.getString(PAYLOAD_CLASS_NAME))
-          .setPreCombineField(hoodieConfig.getStringOrDefault(PRECOMBINE_FIELD, null))
+          .setPreCombineField(optParams.getOrElse(PRECOMBINE_FIELD.key(), null))

Review Comment:
   Yeah, i've created a ticket to revisit the way we handle defaults a while back, but for now we have to come up with remediations like that



-- 
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