cloud-fan commented on a change in pull request #34995:
URL: https://github.com/apache/spark/pull/34995#discussion_r774595441



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala
##########
@@ -225,6 +225,32 @@ class InsertSuite extends QueryTest with TestHiveSingleton 
with BeforeAndAfter
     checkAnswer(sql(selQuery), Row(5, 2, 3, 6))
   }
 
+  test("SPARK-37722: Escape dots in partition names") {
+    withTable("escapeDots") {
+      withSQLConf("hive.exec.dynamic.partition.mode" -> "nonstrict") {
+        sql("CREATE TABLE escapeDots (key int) PARTITIONED BY (value string);")
+        sql("INSERT INTO TABLE escapeDots VALUES (1, 'text.');")
+        sql("INSERT INTO TABLE escapeDots VALUES (2, '.');")

Review comment:
       can we test static partitions? `INSERT INTO TABLE escapeDots 
PARTITION(value = '.') VALUES (4)`

##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala
##########
@@ -225,6 +225,32 @@ class InsertSuite extends QueryTest with TestHiveSingleton 
with BeforeAndAfter
     checkAnswer(sql(selQuery), Row(5, 2, 3, 6))
   }
 
+  test("SPARK-37722: Escape dots in partition names") {
+    withTable("escapeDots") {
+      withSQLConf("hive.exec.dynamic.partition.mode" -> "nonstrict") {
+        sql("CREATE TABLE escapeDots (key int) PARTITIONED BY (value string);")
+        sql("INSERT INTO TABLE escapeDots VALUES (1, 'text.');")
+        sql("INSERT INTO TABLE escapeDots VALUES (2, '.');")

Review comment:
       can we test static partitions? `INSERT INTO TABLE escapeDots 
PARTITION(value = '.') VALUES (2)`




-- 
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