codope commented on code in PR #7901:
URL: https://github.com/apache/hudi/pull/7901#discussion_r1113876340


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieWriterUtils.scala:
##########
@@ -38,26 +38,23 @@ import scala.collection.JavaConverters._
  */
 object HoodieWriterUtils {
 
-  def javaParametersWithWriteDefaults(parameters: java.util.Map[String, 
String]): java.util.Map[String, String] = {
+  /*def javaParametersWithWriteDefaults(parameters: java.util.Map[String, 
String]): java.util.Map[String, String] = {

Review Comment:
   let's remove this?



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieWriterUtils.scala:
##########
@@ -86,6 +83,20 @@ object HoodieWriterUtils {
     hoodieConfig.setDefaultValue(RECONCILE_SCHEMA)
     hoodieConfig.setDefaultValue(DROP_PARTITION_COLUMNS)
     
hoodieConfig.setDefaultValue(KEYGENERATOR_CONSISTENT_LOGICAL_TIMESTAMP_ENABLED)
+    if (isFreshTable) { // only set default values for a fresh table. these 
might be used for config validation in subsequent commits and hence
+      // we should not setting defaults. (infer function could result in 
setting wrong defaults)
+      hoodieConfig.setDefaultValue(PAYLOAD_CLASS_NAME)
+      hoodieConfig.setDefaultValue(KEYGENERATOR_CLASS_NAME)

Review Comment:
   What about payload ordering/precombine field, record key and partitionpath 
fields? They don't have any defaults, is it?



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

Reply via email to