You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2014/08/06 21:52:12 UTC
[jira] [Resolved] (OPTIQ-360) Introduce a Rule to infer predicates
from equi join conditions.
[ https://issues.apache.org/jira/browse/OPTIQ-360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved OPTIQ-360.
-------------------------------
Resolution: Fixed
Fixed in http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/c33e602f.
> Introduce a Rule to infer predicates from equi join conditions.
> ---------------------------------------------------------------
>
> Key: OPTIQ-360
> URL: https://issues.apache.org/jira/browse/OPTIQ-360
> Project: Optiq
> Issue Type: New Feature
> Reporter: Harish Butani
> Assignee: Julian Hyde
> Attachments: OPTIQ-360.1.patch
>
>
> This is along the lines of the TransitivePredicate inference Rule in Hive.
> For e.g. for
> {code}
> select 1 from sales.emp d inner join sales.emp e
> on d.deptno = e.deptno where e.deptno > 7
> {code}
> we can infer
> {code}
> ProjectRel(EXPR$0=[1])
> JoinRel(condition=[=($7, $16)], joinType=[inner])
> FilterRel(condition=[>($7, 7)])
> TableAccessRel(table=[[CATALOG, SALES, EMP]])
> FilterRel(condition=[>($7, 7)])
> TableAccessRel(table=[[CATALOG, SALES, EMP]])
> {code}
> More egs in the patch. We can do better than Hive: by pulling up Predicates that are effective above every RelNode and inferring new Predicates for the other side of a Join.
--
This message was sent by Atlassian JIRA
(v6.2#6252)