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

Jakob Odersky edited comment on SPARK-7286 at 11/19/15 11:00 PM:
-----------------------------------------------------------------

I just realized that <> would also have a different precedence that ===

That pretty much limits our options to 1 or 3

Thinking about option 1 again, it might actually not be that bad since 
(in-)equality comparisons typically happen between expressions using higher 
precedence characters (*/+-:%). If the dollar column operator were removed it 
would become a very rare situation.

On a side note, why was the dollar character actually used? from what I know 
its use is discouraged as it can clash with compiler generated identifiers


was (Author: jodersky):
I just realized that <> would also have a different precedence that ===

That pretty much limits our options to 1 or 3

> 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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to