hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Pivovarov (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HIVE-9992) Operator Precedence is incorrect. bitwise XOR should be after minus/plus
Date Tue, 17 Mar 2015 18:03:39 GMT

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

Alexander Pivovarov resolved HIVE-9992.
---------------------------------------
    Resolution: Not a Problem

I checked MySQL doc again. Bitwise XOR ^ has higher precedence than -/+ in MySQL.
http://dev.mysql.com/doc/refman/5.0/en/operator-precedence.html
Hive implemented similar way.

> 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
>
> bitwise XOR ^ has higher precedence than -/+ in hive
> But in java bitwise XOR has lower precedence
> 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)

Mime
View raw message