File tree Expand file tree Collapse file tree
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2748,7 +2748,10 @@ abstract class JsonSuite
27482748
27492749 test(" SPARK-37360: Write and infer TIMESTAMP_NTZ values with a non-default pattern" ) {
27502750 withTempPath { path =>
2751- val exp = spark.sql(" select timestamp_ntz'2020-12-12 12:12:12' as col0" )
2751+ val exp = spark.sql("""
2752+ select timestamp_ntz'2020-12-12 12:12:12' as col0 union all
2753+ select timestamp_ntz'2020-12-12 12:12:12.123456' as col0
2754+ """ )
27522755 exp.write
27532756 .option(" timestampNTZFormat" , " yyyy-MM-dd HH:mm:ss.SSSSSS" )
27542757 .json(path.getAbsolutePath)
@@ -2767,7 +2770,10 @@ abstract class JsonSuite
27672770
27682771 test(" SPARK-37360: Write and infer TIMESTAMP_LTZ values with a non-default pattern" ) {
27692772 withTempPath { path =>
2770- val exp = spark.sql(" select timestamp_ltz'2020-12-12 12:12:12' as col0" )
2773+ val exp = spark.sql("""
2774+ select timestamp_ltz'2020-12-12 12:12:12' as col0 union all
2775+ select timestamp_ltz'2020-12-12 12:12:12.123456' as col0
2776+ """ )
27712777 exp.write
27722778 .option(" timestampFormat" , " yyyy-MM-dd HH:mm:ss.SSSSSS" )
27732779 .json(path.getAbsolutePath)
You can’t perform that action at this time.
0 commit comments