Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21935#discussion_r206742399
--- Diff:
external/avro/src/main/scala/org/apache/spark/sql/avro/SchemaConverters.scala
---
@@ -114,7 +121,10 @@ object SchemaConverters {
case ByteType | ShortType | IntegerType => builder.intType()
case LongType => builder.longType()
case DateType => builder.longType()
- case TimestampType => builder.longType()
+ case TimestampType =>
+ // To be consistent with the previous behavior of writing
Timestamp type with Avro 1.7,
--- End diff --
also we should follow parquet and have a config
`spark.sql.avro.outputTimestampType` to control it.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]