Skip to content

Commit a626c9d

Browse files
author
Ivan Sadikov
committed
address comments
1 parent 50690e9 commit a626c9d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json

sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)