You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/07 06:03:50 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #34201: [SPARK-36941][SQL][TESTS] Check saving/loading of ANSI intervals to Hive Parquet table

MaxGekk commented on a change in pull request #34201:
URL: https://github.com/apache/spark/pull/34201#discussion_r723870451



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveParquetSourceSuite.scala
##########
@@ -382,4 +383,16 @@ class HiveParquetSourceSuite extends ParquetPartitioningTest {
       }
     }
   }
+
+  test("SPARK-36941: Save/load ANSI intervals to Hive Parquet table") {
+    val tableName = "tbl_ansi_intervals"
+    withTable(tableName) {
+      val (ym, dt) = (java.time.Period.ofMonths(10), java.time.Duration.ofDays(1))
+      val df = Seq((ym, dt)).toDF("ym", "dt")
+      df.write.mode(SaveMode.Overwrite).format("parquet").saveAsTable(tableName)
+      withAllParquetReaders {
+        checkAnswer(sql(s"select * from $tableName"), Row(ym, dt))

Review comment:
       Other tests in the test suite use this approach. Let's keep this as is for consistency.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org