Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/21935#discussion_r207095177 --- Diff: external/avro/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala --- @@ -79,4 +80,16 @@ class AvroOptions( val compression: String = { parameters.get("compression").getOrElse(SQLConf.get.avroCompressionCodec) } + + /** + * The `outputTimestampType` option sets which Avro timestamp type to use when Spark writes + * data to Avro files. Currently supported types are `TIMESTAMP_MICROS` and `TIMESTAMP_MILLIS`. + * TIMESTAMP_MICROS is a logical timestamp type in Avro, which stores number of microseconds + * from the Unix epoch. TIMESTAMP_MILLIS is also logical, but with millisecond precision, + * which means Spark has to truncate the microsecond portion of its timestamp value. + */ + val outputTimestampType: AvroOutputTimestampType.Value = { --- End diff -- I'm ok with it, I think parquet should also follow this.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org