cshuo commented on code in PR #20544:
URL: https://github.com/apache/hudi/pull/20544#discussion_r4533453937


##########
hudi-common/src/main/java/org/apache/hudi/common/avro/AvroRecordContext.java:
##########
@@ -203,6 +241,18 @@ public UnaryOperator<IndexedRecord> 
projectRecord(HoodieSchema from, HoodieSchem
     return record -> HoodieAvroUtils.rewriteRecordWithNewSchema(record, 
to.toAvroSchema(), renamedColumns);
   }
 
+  /**
+   * Initializes schema-aware conversion so delete values use the same logical 
types as data records.
+   */
+  public void initOrderingValueConverter(HoodieSchema dataSchema, List<String> 
orderingFieldNames) {
+    orderingValueConverter = AvroOrderingValueConverter.create(dataSchema, 
orderingFieldNames, consistentLogicalTimestampEnabled);
+  }
+
+  @Override
+  public Comparable convertOrderingValueToEngineType(Comparable value) {
+    return orderingValueConverter == null ? 
super.convertOrderingValueToEngineType(value) : 
orderingValueConverter.convert(value);

Review Comment:
   The fallback is no longer needed now that Trino also initializes the 
converter, removed.



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