hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Sichi (JIRA)" <>
Subject [jira] [Commented] (HIVE-1989) recognize transitivity of predicates on join keys
Date Fri, 02 Sep 2011 22:26:09 GMT


John Sichi commented on HIVE-1989:

+1.  Will commit when tests pass.

> recognize transitivity of predicates on join keys
> -------------------------------------------------
>                 Key: HIVE-1989
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>          Components: Query Processor
>    Affects Versions: 0.6.0
>            Reporter: John Sichi
>            Assignee: Charles Chen
>             Fix For: 0.8.0
>         Attachments: HIVE-1989v1.patch, HIVE-1989v10.patch, HIVE-1989v11.patch, HIVE-1989v12.patch,
HIVE-1989v4.patch, HIVE-1989v5-WITH-HIVE-2382v1.patch, HIVE-1989v6-WITH-HIVE-2383v1.patch,
HIVE-1989v8.patch, HIVE-1989v9.patch
> Given
> {noformat}
> set hive.mapred.mode=strict;
> create table invites (foo int, bar string) partitioned by (ds string);
> create table invites2 (foo int, bar string) partitioned by (ds string);
> select count(*) from invites join invites2 on invites.ds=invites2.ds where invites.ds='2011-01-01';
> {noformat}
> currently an error occurs:
> {noformat}
> Error in semantic analysis: No Partition Predicate Found for Alias "invites2" Table "invites2"
> {noformat}
> The optimizer should be able to infer a predicate on invites2 via transitivity.  The
current lack places a burden on the user to add a redundant predicate, and makes impossible
(at least in strict mode) join views where both underlying tables are partitioned (the join
select list has to pick one of the tables arbitrarily).

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message