You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alexander Pivovarov (JIRA)" <ji...@apache.org> on 2015/03/17 18:57:38 UTC
[jira] [Updated] (HIVE-9992) Operator Precedence is incorrect.
bitwise XOR should be after minus/plus
[ https://issues.apache.org/jira/browse/HIVE-9992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Pivovarov updated HIVE-9992:
--------------------------------------
Summary: Operator Precedence is incorrect. bitwise XOR should be after minus/plus (was: Operator Precedence is incorrect. XOR should be after minus/plus)
> Operator Precedence is incorrect. bitwise XOR should be after minus/plus
> ------------------------------------------------------------------------
>
> Key: HIVE-9992
> URL: https://issues.apache.org/jira/browse/HIVE-9992
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 1.2.0
> Reporter: Alexander Pivovarov
> Assignee: Alexander Pivovarov
>
> XOR ^ has higher precedence than -/+ in hive
> But in java and in MySQL XOR has lower precedence
> http://dev.mysql.com/doc/refman/5.0/en/operator-precedence.html
> http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html
> {code}
> // now
> select 4 - 2 ^ 8 - 7;
> -13
> // should be
> select 4 - 2 ^ 8 - 7;
> 3
> {code}
> need to fix
> IdentifiersParser.g BITWISEXOR
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)