You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Zheng Shao (JIRA)" <ji...@apache.org> on 2009/05/11 14:55:45 UTC
[jira] Commented: (HIVE-459) Allow limited 'OR' in join clauses
[ 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.