[jira] [Updated] (HIVE-25028) Hive: Select query with IS operator producing unexpected result

2021-04-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot updated HIVE-25028:
--
Labels: pull-request-available  (was: )

> Hive: Select query with IS operator producing unexpected result
> ---
>
> Key: HIVE-25028
> URL: https://issues.apache.org/jira/browse/HIVE-25028
> Project: Hive
>  Issue Type: Bug
>  Components: Parser
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Hive: Select query with IS operator is producing unexpected result.
> The following was executed on postgres:
> {code:java}
> sqlancer=# create table if not exists emp(name text, age int);
> CREATE TABLE
> sqlancer=# insert into emp values ('a', 5), ('b', 15), ('c', 12);
> INSERT 0 3
> sqlancer=# select emp.age from emp where emp.age > 10;
>  age
> -
>   15
>   12
> (2 rows)sqlancer=# select emp.age > 10 is true from emp;
>  ?column?
> --
>  f
>  t
>  t
> (3 rows){code}
> This is happening because IS operator has higher precedence than comparison 
> operators in Hive. In most other databases, comparison operator has higher 
> precedence. The grammar needs to be changed to fix the precedence.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (HIVE-25028) Hive: Select query with IS operator producing unexpected result

2021-04-19 Thread Jesus Camacho Rodriguez (Jira)


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

Jesus Camacho Rodriguez updated HIVE-25028:
---
Reporter: Manthan B Y  (was: Soumyakanti Das)

> Hive: Select query with IS operator producing unexpected result
> ---
>
> Key: HIVE-25028
> URL: https://issues.apache.org/jira/browse/HIVE-25028
> Project: Hive
>  Issue Type: Bug
>  Components: Parser
>Reporter: Manthan B Y
>Assignee: Soumyakanti Das
>Priority: Major
>
> Hive: Select query with IS operator is producing unexpected result.
> The following was executed on postgres:
> {code:java}
> sqlancer=# create table if not exists emp(name text, age int);
> CREATE TABLE
> sqlancer=# insert into emp values ('a', 5), ('b', 15), ('c', 12);
> INSERT 0 3
> sqlancer=# select emp.age from emp where emp.age > 10;
>  age
> -
>   15
>   12
> (2 rows)sqlancer=# select emp.age > 10 is true from emp;
>  ?column?
> --
>  f
>  t
>  t
> (3 rows){code}
> This is happening because IS operator has higher precedence than comparison 
> operators in Hive. In most other databases, comparison operator has higher 
> precedence. The grammar needs to be changed to fix the precedence.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)