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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]