danny0405 commented on a change in pull request #2923:
URL: https://github.com/apache/hudi/pull/2923#discussion_r647077338



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/sink/utils/PayloadCreation.java
##########
@@ -76,6 +78,9 @@ public static PayloadCreation instance(Configuration conf) 
throws Exception {
       ValidationUtils.checkState(preCombineField != null);
       Comparable<?> orderingVal = (Comparable<?>) 
HoodieAvroUtils.getNestedFieldVal(record,
           preCombineField, false);
+      if(orderingVal instanceof LocalDateTime) {
+        orderingVal = ((LocalDateTime) 
orderingVal).atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();

Review comment:
       Why not just use a long if the `orderingVal` data type has no timezone.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to