You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/12/23 08:30:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17253953#comment-17253953 ] 

Apache Spark commented on SPARK-33889:
--------------------------------------

User 'MaxGekk' has created a pull request for this issue:
https://github.com/apache/spark/pull/30904

> 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
>            Priority: Major
>
> 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