dawidwys commented on code in PR #21594:
URL: https://github.com/apache/flink/pull/21594#discussion_r1093073075
##########
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSchemaConverter.java:
##########
@@ -363,6 +368,23 @@ public static Schema convertToSchema(LogicalType
logicalType, String rowName) {
}
Schema timestamp =
avroLogicalType.addToSchema(SchemaBuilder.builder().longType());
return nullable ? nullableSchema(timestamp) : timestamp;
+ case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
+ final LocalZonedTimestampType localZonedTimestampType =
+ (LocalZonedTimestampType) logicalType;
+ precision = localZonedTimestampType.getPrecision();
+ org.apache.avro.LogicalType avrolocalLogicalType;
+ if (precision <= 3) {
+ avrolocalLogicalType = LogicalTypes.localTimestampMillis();
+ } else {
+ throw new IllegalArgumentException(
+ "Avro does not support LocalDateTime type "
Review Comment:
+1, but I'd use `TIMESTAMP_LTZ`
--
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]