nsivabalan commented on a change in pull request #5205:
URL: https://github.com/apache/hudi/pull/5205#discussion_r841127444



##########
File path: 
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieWriterUtils.scala
##########
@@ -115,7 +116,12 @@ object HoodieWriterUtils {
   }
 
   def getOriginKeyGenerator(parameters: Map[String, String]): String = {
-    val kg = parameters.getOrElse(KEYGENERATOR_CLASS_NAME.key(), null)
+    //first check table config for key generator
+    var kg = 
parameters.getOrElse(HoodieTableConfig.KEY_GENERATOR_CLASS_NAME.key, null)

Review comment:
       why can't we directly do getOrDefault in L120?

##########
File path: 
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieWriterUtils.scala
##########
@@ -115,7 +116,12 @@ object HoodieWriterUtils {
   }
 
   def getOriginKeyGenerator(parameters: Map[String, String]): String = {
-    val kg = parameters.getOrElse(KEYGENERATOR_CLASS_NAME.key(), null)
+    //first check table config for key generator
+    var kg = 
parameters.getOrElse(HoodieTableConfig.KEY_GENERATOR_CLASS_NAME.key, null)

Review comment:
       kg -> keyGenClass




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