danny0405 commented on a change in pull request #3390:
URL: https://github.com/apache/hudi/pull/3390#discussion_r682320425



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java
##########
@@ -128,6 +129,11 @@ private void validateRequiredFields(Configuration conf, 
TableSchema schema) {
       throw new ValidationException("Field " + preCombineField + " does not 
exist in the table schema."
           + "Please check 'write.precombine.field' option.");
     }
+
+    if 
(conf.getString(FlinkOptions.TABLE_TYPE).toUpperCase().equals(FlinkOptions.TABLE_TYPE_MERGE_ON_READ)
+        && conf.getBoolean(FlinkOptions.INSERT_ALLOW_DUP)) {
+      throw new ValidationException("Option 'write.insert.allow_dup' is only 
allowed for COPY_ON_WRITE table.");

Review comment:
       Instead of throw exception, how about we just change the option 
`write.insert.allow_dup` to false and log warnings there.




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