You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jakob Odersky (JIRA)" <ji...@apache.org> on 2015/11/19 02:17:10 UTC

[jira] [Comment Edited] (SPARK-7286) Precedence of operator not behaving properly

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

Jakob Odersky edited comment on SPARK-7286 at 11/19/15 1:16 AM:
----------------------------------------------------------------

The problem is that !== is recognized as an assignment operator (according to §6.12.4 of the scala specification http://www.scala-lang.org/docu/files/ScalaReference.pdf) and thus has lower precedence than any other operator.
A potential fix could be to rename !== to
 =!=


was (Author: jodersky):
The problem is that !== is recognized as an assignment operator (according to §6.12.4 of the scala specification http://www.scala-lang.org/docu/files/ScalaReference.pdf) and thus has lower precedence than any other operator.
A potential fix could be to rename !== to =!=

> Precedence of operator not behaving properly
> --------------------------------------------
>
>                 Key: SPARK-7286
>                 URL: https://issues.apache.org/jira/browse/SPARK-7286
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.3.1
>         Environment: Linux
>            Reporter: DevilJetha
>            Priority: Critical
>
> The precedence of the operators ( especially with !== and && ) in Dataframe Columns seems to be messed up.
> Example Snippet
> .where( $"col1" === "val1" && ($"col2"  !== "val2")  ) works fine.
> whereas .where( $"col1" === "val1" && $"col2"  !== "val2"  )
> evaluates as ( $"col1" === "val1" && $"col2" ) !== "val2"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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