Hi all, The avro specification supports microseconds and reviewing the source code in org.apache.avro.LogicalTypes seems to indicate microsecond support. However, the conversion code in flink (see org.apache.flink.formats.avro.typeutils.AvroSchemaConverter#convertToSchema)
has this checked: if (precision <= 3) { avroLogicalType = LogicalTypes.timestampMillis(); } else { throw new IllegalArgumentException( "Avro does not support TIMESTAMP type " + "with precision: " + precision + ", it only supports precision less than 3."); } So it seems that flink only supports managing avro timestamps with at most millisecond precision. Does someone have a brief explanation about why this limitation exists? Depending on how complicated it is,
I’d be willing to submit a PR to add that support in. Thanks, Joe |