nsivabalan commented on code in PR #5205:
URL: https://github.com/apache/hudi/pull/5205#discussion_r841797228


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieWriterUtils.scala:
##########
@@ -173,6 +175,29 @@ object HoodieWriterUtils {
     }
   }
 
+  /**
+   * Detects conflicts between datasourceKeyGen and existing table 
configuration keyGen
+   */
+  def validateKeyGeneratorConfig(datasourceKeyGen: String, tableConfig: 
HoodieConfig): Unit = {
+    val diffConfigs = StringBuilder.newBuilder
+
+    if (null != tableConfig) {

Review Comment:
   will this also work for the case when, in first commit it was default key 
gen (user did not pass any key gen), and in 2nd commit, it was non-partitioned 
key gen. 
   And lets also ensure below configurations work. 
   1. 1st commit: no key gen passed. 2nd commit: explicitly setting simple key 
gen. Result: should succeed w/o issues.
   2. same as (1), but flipped. i..e 1st commit: simple key gen. 2nd commit: no 
key gen set. Result: should succeed w/o issues.



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