JingsongLi commented on code in PR #1171:
URL: https://github.com/apache/incubator-paimon/pull/1171#discussion_r1198548771
##########
paimon-format/src/main/java/org/apache/paimon/format/avro/AvroSchemaConverter.java:
##########
@@ -110,6 +111,25 @@ public static Schema convertToSchema(DataType dataType,
String rowName) {
}
Schema timestamp =
avroLogicalType.addToSchema(SchemaBuilder.builder().longType());
return nullable ? nullableSchema(timestamp) : timestamp;
+ case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
+ final LocalZonedTimestampType localTimestampType =
+ (LocalZonedTimestampType) dataType;
+ precision = localTimestampType.getPrecision();
+ org.apache.avro.LogicalType localTimestampLogicalType;
+ if (precision <= 3) {
+ localTimestampLogicalType =
LogicalTypes.localTimestampMillis();
+ } else if (precision <= 6) {
+ localTimestampLogicalType =
LogicalTypes.localTimestampMicros();
Review Comment:
Can you also modify `TIMESTAMP_WITHOUT_TIME_ZONE` too?
--
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]