You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Tobias Hermann (Jira)" <ji...@apache.org> on 2020/01/05 11:13:00 UTC

[jira] [Commented] (SPARK-30421) Dropped columns still available for filtering

    [ https://issues.apache.org/jira/browse/SPARK-30421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17008301#comment-17008301 ] 

Tobias Hermann commented on SPARK-30421:
----------------------------------------

see: [https://stackoverflow.com/questions/59597678/why-does-filtering-on-a-non-existing-non-selected-column-work]

> Dropped columns still available for filtering
> ---------------------------------------------
>
>                 Key: SPARK-30421
>                 URL: https://issues.apache.org/jira/browse/SPARK-30421
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 2.4.4
>            Reporter: Tobias Hermann
>            Priority: Minor
>
> The following minimal example:
> {quote}val df = Seq((0, "a"), (1, "b")).toDF("foo", "bar")
> df.select("foo").where($"bar" === "a").show
> df.drop("bar").where($"bar" === "a").show
> {quote}
> should result in an error like the following:
> {quote}org.apache.spark.sql.AnalysisException: cannot resolve '`bar`' given input columns: [foo];
> {quote}
> However, it does not but instead works without error, as if the column "bar" would exist.



--
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