danny0405 commented on a change in pull request #2923:
URL: https://github.com/apache/hudi/pull/2923#discussion_r647096205
##########
File path: hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java
##########
@@ -485,6 +488,10 @@ private static Object
convertValueForAvroLogicalTypes(Schema fieldSchema, Object
return decimalConversion.fromBytes((ByteBuffer) fieldValue,
fieldSchema,
LogicalTypes.decimal(dc.getPrecision(), dc.getScale()));
}
+ } else if (fieldSchema.getLogicalType() == LogicalTypes.timestampMicros())
{
+ return Instant.EPOCH.plus(Long.parseLong(fieldValue.toString()),
ChronoUnit.MICROS).atZone(ZoneId.systemDefault()).toLocalDateTime();
+ } else if (fieldSchema.getLogicalType() == LogicalTypes.timestampMillis())
{
Review comment:
Why we also change the value of type `LogicalTypes.timestampMillis` from
long to `LocalDataTime` ? What is the gain ?
--
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]