Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/17277#discussion_r105805867
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/PartitionProviderCompatibilitySuite.scala
---
@@ -316,6 +316,20 @@ class PartitionProviderCompatibilitySuite
}
}
}
+
+ test(s"SPARK-19887 partition value is null - partition management
$enabled") {
+ withTable("test") {
+ Seq((1, "p", 1), (2, null, 2)).toDF("a", "b", "c")
+ .write.partitionBy("b", "c").saveAsTable("test")
+ checkAnswer(spark.table("test"),
+ Row(1, "p", 1) :: Row(2, null, 2) :: Nil)
+
+ Seq((3, null: String, 3)).toDF("a", "b", "c")
+ .write.mode("append").partitionBy("b", "c").saveAsTable("test")
+ checkAnswer(spark.table("test"),
+ Row(1, "p", 1) :: Row(2, null, 2) :: Row(3, null, 3) :: Nil)
+ }
+ }
--- End diff --
no they don't work. `ALTER TABLE xxx ADD PARTITION(A=null)`, we will
interpret `null` as a string instead of a null value. We should fix it in the
follow-up.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]