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



##########
File path: 
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala
##########
@@ -229,7 +229,11 @@ object HoodieSparkSqlWriter {
             }
             sparkContext.getConf.registerAvroSchemas(schema)
             log.info(s"Registered avro schema : ${schema.toString(true)}")
-
+            val columnSet = df.columns.toSet
+            keyGenerator.getRecordKeyFieldNames.foreach(fieldName => 
if(!columnSet.contains(fieldName)) {

Review comment:
       yeah. we can't control user defined ones. if you feel this is too tight 
of a constraint, then probably we have to drop this patch. 
   One option is, to add validateKeyGenProps api to our keyGenerator interface 
and have it empty for base impl. 
   only for internal implementations, we can add this validation. 
   




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