Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
This is along the lines of the TransitivePredicate inference Rule in Hive.
For e.g. for
select 1 from sales.emp d inner join sales.emp e
on d.deptno = e.deptno where e.deptno > 7
we can infer
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]])
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.
Attachments
Attachments
Issue Links
- is duplicated by
-
CALCITE-41 Add rule to propagate constraints onto aliased columns
- Closed