Description
The following test fails with NPE on V2 table:
test("null and empty string as partition values") { import testImplicits._ withNamespaceAndTable("ns", "tbl") { t => val df = Seq((0, ""), (1, null)).toDF("a", "part") df.write .partitionBy("part") .format("parquet") .mode(SaveMode.Overwrite) .saveAsTable(t) runShowPartitionsSql(s"SHOW PARTITIONS $t", Row("part=null") :: Nil) } }
java.lang.NullPointerException was thrown. java.lang.NullPointerException at org.apache.spark.sql.execution.datasources.v2.ShowPartitionsExec.$anonfun$run$3(ShowPartitionsExec.scala:58) at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:238)