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 2021/12/25 19:24:56 UTC
[GitHub] [hudi] vinothchandar commented on a change in pull request #4342: [HUDI-735] Fixing error messages on record key not found
vinothchandar commented on a change in pull request #4342:
URL: https://github.com/apache/hudi/pull/4342#discussion_r775163936
##########
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:
do all keygenerator return some valid key field names? including custom ones implemented by users outside the project? If not, then May need to be more defensive in the check.
--
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