You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Tiansu Yu <ti...@icloud.com> on 2025/06/17 08:27:57 UTC

Cannot cast TIMESTAMP_LTZ with confluent-avro

Hi,
I have just noticed that flink confluent avro will use legacy timestamp mapping <https://nightlies.apache.org/flink/flink-docs-release-2.0/docs/connectors/table/formats/avro/#timestamp_mapping-legacy>, which results in
java.lang.UnsupportedOperationException: Unsupported to derive Schema for type: TIMESTAMP_LTZ(3)
at org.apache.flink.formats.avro.typeutils.AvroSchemaConverter.convertToSchema(AvroSchemaConverter.java:494) ~[flink-sql-avro-1.19.2.jar:1.19.2] 
however, this argument is only available for flink avro not flink confluent avro format. Therefore it is unable to cast unix timstamp in avro properly as a source table in Flink, while using confluent-avro format (where you can hook schema registry).
Is this a bug or have I missed something? 

Best,
Tiansu