leonardBang commented on code in PR #23511:
URL: https://github.com/apache/flink/pull/23511#discussion_r1461404314
##########
flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/AvroFormatOptions.java:
##########
@@ -71,5 +70,11 @@ public InlineElement getDescription() {
}
}
+ public static final ConfigOption<Boolean> AVRO_TIMESTAMP_LEGACY_MAPPING =
+ ConfigOptions.key("timestamp_mapping.legacy")
+ .booleanType()
+ .defaultValue(true)
+ .withDescription("Use the legacy mapping of timestamp in
avro");
Review Comment:
Could you add more description here just like ?
`The legacy behavior of Flink wrongly mapped both SQL TIMESTAMP and
TIMESTAMP_LTZ type to AVRO TIMESTAMP before Flink 1.19 version, the correct
behavior is Flink SQL TIMESTAMP maps Avro LOCAL TIMESTAMP and Flink SQL
TIMESTAMP_LTZ maps Avro TIMESTAMP, you can obtain the correct mapping by
disable using this legacy mapping. Use legacy behavior by default for
compatibility consideration.
` You can polish this base on my poor English.
--
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]