nsivabalan commented on code in PR #13469:
URL: https://github.com/apache/hudi/pull/13469#discussion_r2162788843


##########
hudi-common/src/main/java/org/apache/hudi/common/util/ConfigUtils.java:
##########
@@ -79,12 +79,12 @@ public class ConfigUtils {
    */
   public static String getOrderingField(Properties properties) {
     String orderField = null;
-    if 
(properties.containsKey(HoodiePayloadProps.PAYLOAD_ORDERING_FIELD_PROP_KEY)) {
-      orderField = 
properties.getProperty(HoodiePayloadProps.PAYLOAD_ORDERING_FIELD_PROP_KEY);
-    } else if 
(properties.containsKey("hoodie.datasource.write.precombine.field")) {
+    if (properties.containsKey("hoodie.datasource.write.precombine.field")) {
       orderField = 
properties.getProperty("hoodie.datasource.write.precombine.field");
     } else if 
(properties.containsKey(HoodieTableConfig.PRECOMBINE_FIELD.key())) {
       orderField = 
properties.getProperty(HoodieTableConfig.PRECOMBINE_FIELD.key());
+    } else if 
(properties.containsKey(HoodiePayloadProps.PAYLOAD_ORDERING_FIELD_PROP_KEY)) {

Review Comment:
   Is the change in order of these configs intentional? 
   previously it was HoodiePayloadProps.PAYLOAD_ORDERING_FIELD_PROP_KEY, 
followed by "hoodie.datasource.write.precombine.field", and then 
HoodieTableConfig.PRECOMBINE_FIELD.key().
   
   which ever config property is set, we take that. 
   
   and now, we are switching the ordering of these to 
   
   hoodie.datasource.write.precombine.field -> 
HoodieTableConfig.PRECOMBINE_FIELD.key() -> 
HoodiePayloadProps.PAYLOAD_ORDERING_FIELD_PROP_KEY 
   
   ordering field is a immutable table property similar to table type for 
instance. 
   So, why honor a diff write property if set? just in this code snippet. 
   Anyways, down the line the write fail if someone attempted to write to a 
table by switching ordering field config property. 
   
   
   



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