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

Laszlo Bodor reassigned HIVE-14838:
-----------------------------------

    Assignee: Laszlo Bodor

> F481: Expanded NULL Predicate
> -----------------------------
>
>                 Key: HIVE-14838
>                 URL: https://issues.apache.org/jira/browse/HIVE-14838
>             Project: Hive
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Carter Shanklin
>            Assignee: Laszlo Bodor
>            Priority: Major
>
> F481 is mandatory in the SQL spec. In the context of comparisons to null and 
> not null "The <row value expression> can be something other than a <column 
> reference>". Essentially a full row / tuple can be compared against null.
> An example in Postgres:
> {code}
> vagrant=# create table test (x int, y int, z int);
> vagrant=# insert into test values (1, 1, 1);
> vagrant=# insert into test values (2, 2, 2);
> vagrant=# insert into test values (null, 3, null);
> vagrant=# insert into test values (4, null, null);
> vagrant=# insert into test values (null, null, null);
> vagrant=# select * from test where (x, z) is null;
>  x | y | z
> ---+---+---
>    | 3 |
>    |   |
> (2 rows)
> vagrant=# select * from test where (x, z) is not null;
>  x | y | z
> ---+---+---
>  1 | 1 | 1
>  2 | 2 | 2
> {code}
> Hive currently produces a parse error for these queries.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to