Hi all,

Recently, I tried to use Flink to write some Avro data to Iceberg. However,
the timestamp representations for these systems really confused me. Here
are some facts:

   - Avro uses `java.time.Instant` for logical type `timestamp_ms`;
   - Flink takes `java.time.Instant` as table type
   `TIMESTAMP_WITH_LOCAL_TIME_ZONE`;
   - Iceberg takes Avro `timestamp_ms` as timestamp without timezone.

When I used Flink DataType TIMESTAMP for timestamp_ms of Avro, I got the
following error "*class java.time.Instant cannot be cast to class
java.time.LocalDateTime*".

If I change the Flink DataType to TIMESTAMP_WITH_LOCAL_TIME_ZONE, Iceberg
complains "t*imestamptz cannot be promoted to timestamp".*

Does anyone have any thoughts on this?

Thanks,
Xingcan

Reply via email to