lokeshj1703 commented on code in PR #13526:
URL: https://github.com/apache/hudi/pull/13526#discussion_r2225488297


##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -380,21 +380,23 @@ private BiFunction<T, Schema, String> 
virtualKeyExtractor(String[] recordKeyFiel
   /**
    * Gets the ordering value in particular type.
    *
-   * @param record An option of record.
-   * @param schema The Avro schema of the record.
-   * @param orderingFieldName name of the ordering field
+   * @param record             An option of record.
+   * @param schema             The Avro schema of the record.
+   * @param orderingFieldNames name of the ordering field
    * @return The ordering value.
    */
   public Comparable getOrderingValue(T record,
                                      Schema schema,
-                                     Option<String> orderingFieldName) {
-    if (orderingFieldName.isEmpty()) {
-      return DEFAULT_ORDERING_VALUE;
+                                     Option<List<String>> orderingFieldNames) {

Review Comment:
   HoodieFileGroupReader uses Option for commit time ordering it seems.
   ```
       this.orderingFieldNames = readerContext.getMergeMode() == 
RecordMergeMode.COMMIT_TIME_ORDERING
           ? Option.empty()
           : ConfigUtils.getOrderingFields(props).map(Arrays::asList)
           .or(() -> 
hoodieTableMetaClient.getTableConfig().getPreCombineFields());
   ```
   The function is getting called from `BufferedRecord#forRecordWithContext` 
which is using orderingFieldNames from HoodieFileGroupReader. So did not change 
the functionality here.



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