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 2022/09/06 20:23:52 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #6395: [HUDI-4620] No expected exception is thrown when create hudi table without primaryKey

yihua commented on code in PR #6395:
URL: https://github.com/apache/hudi/pull/6395#discussion_r964134956


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/HoodieOptionConfig.scala:
##########
@@ -46,7 +46,6 @@ object HoodieOptionConfig {
     .withSqlKey("primaryKey")
     .withHoodieKey(DataSourceWriteOptions.RECORDKEY_FIELD.key)
     .withTableConfigKey(HoodieTableConfig.RECORDKEY_FIELDS.key)
-    .defaultValue(DataSourceWriteOptions.RECORDKEY_FIELD.defaultValue())

Review Comment:
   Shall we also remove the default value in `KeyGeneratorOptions` so that Spark SQL has consistent behavior with Spark datasource?
   ```
   public static final ConfigProperty<String> RECORDKEY_FIELD_NAME = ConfigProperty
         .key("hoodie.datasource.write.recordkey.field")
         .defaultValue("uuid")
         .withDocumentation("Record key field. Value to be used as the `recordKey` component of `HoodieKey`.\n"
             + "Actual value will be obtained by invoking .toString() on the field value. Nested fields can be specified using\n"
             + "the dot notation eg: `a.b.c`");
   ```
   cc @YannByron @nsivabalan 



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