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:
   Looks like we wanted to make table config the source of truth. 
   
   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 can't we just rely on only the table property here and ignore other 
options. 
   
   Is it bcoz, we could also be using the same code path while writing to the 
table for first time?
   
   
   
   
   



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