You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2020/12/23 15:52:00 UTC
[jira] [Resolved] (SPARK-33889) NPE from SHOW PARTITIONS for null
partition values
[ https://issues.apache.org/jira/browse/SPARK-33889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-33889.
---------------------------------
Fix Version/s: 3.1.0
Resolution: Fixed
Issue resolved by pull request 30907
[https://github.com/apache/spark/pull/30907]
> NPE from SHOW PARTITIONS for null partition values
> --------------------------------------------------
>
> Key: SPARK-33889
> URL: https://issues.apache.org/jira/browse/SPARK-33889
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 3.2.0
> Reporter: Maxim Gekk
> Assignee: Maxim Gekk
> Priority: Major
> Fix For: 3.1.0
>
>
> The following test fails with NPE on V2 table:
> {code:scala}
> 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)
> }
> }
> {code}
> {code:java}
> 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)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org