vaibhav-sinha commented on a change in pull request #2923:
URL: https://github.com/apache/hudi/pull/2923#discussion_r647096816
##########
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:
When converting epoch to `LocalDateTime`, a timezone needs to be
specified, and we are using `ZoneId.systemDefault()` there. Hence when
converting back from `LocalDateTime` to epoch, we are using the same.
--
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]