hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sivaramakrishnan Narayanan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-784) Support uncorrelated subqueries in the WHERE clause
Date Wed, 06 Nov 2013 18:24:17 GMT

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

Sivaramakrishnan Narayanan commented on HIVE-784:
-------------------------------------------------

Another comment on the design doc:

Section 2.4

"Not Exists has the same semantics as a correlated Not In Operator without the SubQuery Expression"

This is not strictly true, again because of nulls in subquery. Let's take the same tables
as in previous comment. Now let's consider the not-exists query.

{code}
select * from T1 where not exists (select * from T2 where T2.y=T1.x)
{code}

The result for this query should be:
||T1.x||
|2|
|null|

The LOJ with null filter transformation works for "Not Exists", but not for "Not In". Again,
if your implementation already takes care of this, please ignore.

My head hurts :)

> Support uncorrelated subqueries in the WHERE clause
> ---------------------------------------------------
>
>                 Key: HIVE-784
>                 URL: https://issues.apache.org/jira/browse/HIVE-784
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Ning Zhang
>            Assignee: Harish Butani
>             Fix For: 0.13.0
>
>         Attachments: D13443.1.patch, D13443.2.patch, HIVE-784.1.patch.txt, HIVE-784.2.patch,
SubQuerySpec.pdf, tpchQueriesUsingSubQueryClauses.sql
>
>
> Hive currently only support views in the FROM-clause, some Facebook use cases suggest
that Hive should support subqueries such as those connected by IN/EXISTS in the WHERE-clause.




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message