hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lefty Leverenz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-15251) Provide support for complex expressions in ON clauses for OUTER joins
Date Sat, 10 Dec 2016 10:36:58 GMT

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

Lefty Leverenz commented on HIVE-15251:
---------------------------------------

Documentation for this will be covered when HIVE-15211 gets documented, so I'm not adding
a TODOC label.

> Provide support for complex expressions in ON clauses for OUTER joins
> ---------------------------------------------------------------------
>
>                 Key: HIVE-15251
>                 URL: https://issues.apache.org/jira/browse/HIVE-15251
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO, Parser
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>             Fix For: 2.2.0
>
>         Attachments: HIVE-15251.01.patch, HIVE-15251.patch
>
>
> Follow-up of HIVE-15211.
> Currently, we have some restrictions on the predicates that we can use in ON clauses
for outer joins.
> This patch is an extension to overcome these restrictions. Follow-up work will focus
on identifying some cases, such as disjunctive predicates, that can be run more efficiently
than with a cartesian product.
> It will allow to write queries that currently fail in Hive such as:
> {code:sql}
> -- Disjunctions
> SELECT *
> FROM src1 LEFT OUTER JOIN src
> ON (src1.key=src.key
>   OR src1.value between 100 and 102
>   OR src.value between 100 and 102)
> LIMIT 10;
> -- Conjunction with multiple inputs references in one side
> SELECT *
> FROM src1 RIGHT OUTER JOIN src
> ON (src1.key+src.key >= 100
>   AND src1.key+src.key <= 102)
> LIMIT 10;
> -- Conjunct with no references
> SELECT *
> FROM src1 FULL OUTER JOIN src
> ON (src1.value between 100 and 102
>   AND src.value between 100 and 102
>   AND true)
> LIMIT 10;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message