You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2018/02/24 00:32:00 UTC

[jira] [Resolved] (SPARK-23459) Improve the error message when unknown column is specified in partition columns

     [ https://issues.apache.org/jira/browse/SPARK-23459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao Li resolved SPARK-23459.
-----------------------------
       Resolution: Fixed
         Assignee: Kazuaki Ishizaki
    Fix Version/s: 2.4.0

> Improve the error message when unknown column is specified in partition columns
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-23459
>                 URL: https://issues.apache.org/jira/browse/SPARK-23459
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.0
>            Reporter: Xiao Li
>            Assignee: Kazuaki Ishizaki
>            Priority: Major
>              Labels: starter
>             Fix For: 2.4.0
>
>
> {noformat}
>   test("save with an unknown partition column") {
>     withTempDir { dir =>
>       val path = dir.getCanonicalPath
>         Seq(1L -> "a").toDF("i", "j").write
>           .format("parquet")
>           .partitionBy("unknownColumn")
>           .save(path)
>     }
>   }
> {noformat}
> We got the following error message:
> {noformat}
> Partition column unknownColumn not found in schema StructType(StructField(i,LongType,false), StructField(j,StringType,true));
> {noformat}
> We should not call toString, but catalogString in the function `partitionColumnsSchema` of `PartitioningUtils.scala`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org