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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieBaseFileGroupRecordBuffer.java:
##########
@@ -115,9 +114,16 @@ public 
HoodieBaseFileGroupRecordBuffer(HoodieReaderContext<T> readerContext,
     } else {
       this.payloadClass = Option.empty();
     }
-    this.orderingFieldName = 
Option.ofNullable(ConfigUtils.getOrderingField(props)).orElseGet(() -> 
hoodieTableMetaClient.getTableConfig().getPreCombineField());
-    this.orderingFieldTypeOpt = recordMergeMode == 
RecordMergeMode.COMMIT_TIME_ORDERING ? Option.empty() : 
AvroSchemaUtils.findNestedFieldType(readerSchema, this.orderingFieldName);
-    this.orderingFieldDefault = orderingFieldTypeOpt.map(type -> 
readerContext.castValue(0, type)).orElse(0);
+    this.orderingFieldName = recordMergeMode == 
RecordMergeMode.COMMIT_TIME_ORDERING

Review Comment:
   are we setting the ordering field to empty for regular ingestion writes 
itself? 
   But how about backwards compatability?
   if someone was using overwrite w/ latest payload in 0.15.0, but has ordering 
config set, we are forcing them to change to EVENT_TIME_ORDERING. but its a 
table property right?
   
   can you help me understand



##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecord.java:
##########
@@ -56,6 +56,7 @@ public abstract class HoodieRecord<T> implements 
HoodieRecordCompatibilityInterf
   public static final String FILENAME_METADATA_FIELD = 
HoodieMetadataField.FILENAME_METADATA_FIELD.getFieldName();
   public static final String OPERATION_METADATA_FIELD = 
HoodieMetadataField.OPERATION_METADATA_FIELD.getFieldName();
   public static final String HOODIE_IS_DELETED_FIELD = "_hoodie_is_deleted";
+  public static final int COMMIT_TIME_ORDERING_VALUE = 0;

Review Comment:
   I feel "COMMIT_TIME_ORDERING_VALUE" is confusing to me. bcoz, when someone 
is using OverwriteWithLatestAvroPayload, we could still have valid ordering 
values. the value 0 is used, only when ordering value is missing from the 
record. 
   
   



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