danny0405 commented on code in PR #7394:
URL: https://github.com/apache/hudi/pull/7394#discussion_r1046580467


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/catalyst/catalog/HoodieCatalogTable.scala:
##########
@@ -245,6 +245,10 @@ class HoodieCatalogTable(val spark: SparkSession, var 
table: CatalogTable) exten
       case (_, false) =>
         ValidationUtils.checkArgument(table.schema.nonEmpty,
           s"Missing schema for Create Table: $catalogTableName")
+        if (sqlOptions.contains("hoodie.datasource.write.keygenerator.class") 
&&
+        !sqlOptions.contains("hoodie.table.keygenerator.class")) {

Review Comment:
   In `HoodieSparkSqlWriter#mergeParamsAndGetHoodieConfig` we can see similar 
logic, we can unify the code base, also we should not use hard-code option keys.



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