flashJd commented on code in PR #6246:
URL: https://github.com/apache/hudi/pull/6246#discussion_r936432853


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##########
@@ -147,7 +147,7 @@ private void sanityCheck(Configuration conf, ResolvedSchema 
schema) {
         throw new HoodieValidationException("Option '" + 
FlinkOptions.PRECOMBINE_FIELD.key()
             + "' is required for payload class: " + 
DefaultHoodieRecordPayload.class.getName());
       }
-      if 
(preCombineField.equals(FlinkOptions.PRECOMBINE_FIELD.defaultValue())) {
+      if (preCombineField.equals(FlinkOptions.PRECOMBINE_FIELD.defaultValue()) 
|| preCombineField.equals(FlinkOptions.NO_PRE_COMBINE)){
         conf.setString(FlinkOptions.PRECOMBINE_FIELD, 
FlinkOptions.NO_PRE_COMBINE);

Review Comment:
   it's valid, suppose a table with a 'ts' column, we want to set 
PRECOMBINE_FIELD=FlinkOptions.NO_PRE_COMBINE to disable the precombine field, 
above code will go into line 153, because 
preCombineField.equals(FlinkOptions.PRECOMBINE_FIELD.defaultValue()) is false, 
FlinkOptions.PRECOMBINE_FIELD.defaultValue() is 'ts', preCombineField is what 
we set 'no_precombine', you can also see the test.



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