hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-459) Allow limited 'OR' in join clauses
Date Mon, 11 May 2009 12:55:45 GMT

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

Zheng Shao commented on HIVE-459:
---------------------------------

Another way to write it is:

{code}
FROM a
FULL OUTER JOIN b ON b.foo = a.foo
FULL OUTER JOIN c ON c.foo = IF(a.foo IS NULL, b.foo, a.foo)
{code}


In the future we will provide COALESCE (HIVE-470) to make it easier to write the expression
of the IF condition.


> Allow limited 'OR' in join clauses
> ----------------------------------
>
>                 Key: HIVE-459
>                 URL: https://issues.apache.org/jira/browse/HIVE-459
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: S. Alex Smith
>            Priority: Minor
>
> A (somewhat) common use case for full outer joins is
> FROM a
> FULL OUTER JOIN b ON (b.foo = a.foo)
> FULL OUTER JOIN c ON (c.foo = a.foo OR c.foo = b.foo)
> It would be nice if this (or equivalent functionality) could be supported by hive.  Note
that this is a specific use of OR that would allow rows from all three tables to be clustered
on the same key.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message