Peng-Lei commented on a change in pull request #34561:
URL: https://github.com/apache/spark/pull/34561#discussion_r748009418



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2915,6 +2915,39 @@ class DataSourceV2SQLSuite
     }
   }
 
+  test("SPARK-37294: insert ANSI intervals into a table partitioned by the 
interval columns") {
+    val tbl = "testpart.interval_table"
+    Seq(PartitionOverwriteMode.DYNAMIC, PartitionOverwriteMode.STATIC).foreach 
{ mode =>
+      withSQLConf(SQLConf.PARTITION_OVERWRITE_MODE.key -> mode.toString) {
+        withTable(tbl) {
+          sql(
+            s"""
+               |CREATE TABLE $tbl (i INT, part1 INTERVAL YEAR, part2 INTERVAL 
DAY) USING $v2Format
+               |PARTITIONED BY (part1, part2)
+              """.stripMargin)
+
+          sql(
+            s"""ALTER TABLE $tbl ADD PARTITION (

Review comment:
       nit:
   ```scala
   s"""
        |ALTER TABLE $tbl ADD PARTITION (
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to