Maxim Gekk created SPARK-29949: ---------------------------------- Summary: JSON/CSV formats timestamps incorrectly Key: SPARK-29949 URL: https://issues.apache.org/jira/browse/SPARK-29949 Project: Spark Issue Type: Bug Components: SQL Affects Versions: 2.4.4 Reporter: Maxim Gekk
For example: {code} scala> val t = java.sql.Timestamp.valueOf("2019-11-18 11:56:00.123456") t: java.sql.Timestamp = 2019-11-18 11:56:00.123456 scala> Seq(t).toDF("t").select(to_json(struct($"t"), Map("timestampFormat" -> "yyyy-MM-dd HH:mm:ss.SSSSSS"))).show(false) +-------------------------------------------------+ |structstojson(named_struct(NamePlaceholder(), t))| +-------------------------------------------------+ |{"t":"2019-11-18 11:56:00.000123"} | +-------------------------------------------------+ {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org