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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/EightToNineUpgradeHandler.java:
##########
@@ -201,16 +202,37 @@ private void 
reconcileMergePropertiesConfig(Map<ConfigProperty, String> tablePro
       tablePropsToAdd.put(
           ConfigProperty.key(RECORD_MERGE_PROPERTY_PREFIX + 
PARTIAL_UPDATE_UNAVAILABLE_VALUE).noDefaultValue(), // // to be fixed once we 
land PR #13721.
           DEBEZIUM_UNAVAILABLE_VALUE);
+      tablePropsToAdd.put(

Review Comment:
   nit: corresponding to the addition of merge configs during upgrade, for 
consistency, `NineToEightDowngradeHandler` should remove the new table configs 
in table version 9 during downgrade to avoid confusion.



##########
hudi-common/src/main/java/org/apache/hudi/common/util/HoodieRecordUtils.java:
##########
@@ -222,10 +220,9 @@ public static String 
getCurrentLocationInstant(HoodieRecord<?> record) {
   }
 
   public static List<String> getOrderingFieldNames(RecordMergeMode mergeMode,
-                                                   TypedProperties props,
                                                    HoodieTableMetaClient 
metaClient) {
     return mergeMode == RecordMergeMode.COMMIT_TIME_ORDERING
         ? Collections.emptyList()
-        : 
Option.ofNullable(ConfigUtils.getOrderingFields(props)).map(Arrays::asList).orElseGet(()
 -> metaClient.getTableConfig().getOrderingFields());
+        : metaClient.getTableConfig().getOrderingFields();

Review Comment:
   `ConfigUtils.getOrderingFields` also checks 
`hoodie.datasource.write.precombine.field` in the write config while 
`metaClient.getTableConfig().getOrderingFields()` does not. It looks like 
`hoodie.datasource.write.precombine.field` should only be of concern on the 
write path where Hudi 1.1/master should take care of the case and persist the 
ordering field in the table config before write happens.  In that case, there 
is no problem after this change, right?



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