Skip to content
Closed
Prev Previous commit
recover one test case
  • Loading branch information
gengliangwang committed Oct 15, 2019
commit b9abb67cd9761e59ee62ecb77b269deb725b1185
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class HiveSerDeReadWriteSuite extends QueryTest with SQLTestUtils with TestHiveS
hiveClient.runSqlHive(s"CREATE TABLE hive_serde (c1 TIMESTAMP) STORED AS $fileFormat")
hiveClient.runSqlHive("INSERT INTO TABLE hive_serde values('2019-04-11 15:50:00')")
checkAnswer(spark.table("hive_serde"), Row(Timestamp.valueOf("2019-04-11 15:50:00")))
spark.sql("INSERT INTO TABLE hive_serde values('2019-04-12 15:50:00')")
spark.sql("INSERT INTO TABLE hive_serde values(TIMESTAMP('2019-04-12 15:50:00'))")
checkAnswer(
spark.table("hive_serde"),
Seq(Row(Timestamp.valueOf("2019-04-11 15:50:00")),
Expand All @@ -77,7 +77,7 @@ class HiveSerDeReadWriteSuite extends QueryTest with SQLTestUtils with TestHiveS
hiveClient.runSqlHive(s"CREATE TABLE hive_serde (c1 DATE) STORED AS $fileFormat")
hiveClient.runSqlHive("INSERT INTO TABLE hive_serde values('2019-04-11')")
checkAnswer(spark.table("hive_serde"), Row(Date.valueOf("2019-04-11")))
spark.sql("INSERT INTO TABLE hive_serde values('2019-04-12')")
spark.sql("INSERT INTO TABLE hive_serde values(TIMESTAMP('2019-04-12'))")
checkAnswer(
spark.table("hive_serde"),
Seq(Row(Date.valueOf("2019-04-11")), Row(Date.valueOf("2019-04-12"))))
Expand Down Expand Up @@ -170,7 +170,7 @@ class HiveSerDeReadWriteSuite extends QueryTest with SQLTestUtils with TestHiveS
// Date/Time Types
// SPARK-28885 String value is not allowed to be stored as date/timestamp type with
// ANSI store assignment policy.
// checkDateTimeTypes(fileFormat)
checkDateTimeTypes(fileFormat)

// String Types
checkStringTypes(fileFormat, "STRING", "s1")
Expand Down