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 2020/12/23 03:29:15 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30893: [SPARK-33881][SQL][TESTS] Check null and empty string as partition values in DS v1 and v2 tests

dongjoon-hyun commented on a change in pull request #30893:
URL: https://github.com/apache/spark/pull/30893#discussion_r547619755



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala
##########
@@ -93,4 +93,26 @@ class ShowPartitionsSuite extends ShowPartitionsSuiteBase with CommandSuiteBase
       assert(sql("SHOW PARTITIONS part_datasrc").count() == 3)
     }
   }
+
+  test("null and empty string as partition values") {
+    import testImplicits._
+    withTable("t") {
+      val df = Seq(
+        (0, ""),
+        (1, null)
+      ).toDF("a", "part")

Review comment:
       In this case, shall we use a one-liner because it's simpler?
   ```scala
   - val df = Seq(
   -   (0, ""),
   -   (1, null)
   - ).toDF("a", "part")
   + val df = Seq((0, ""), (1, null)).toDF("a", "part")
   ```




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

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