Hi Gautam, Yes, in case of your query I do the see the filter T2.C2 > 0 being pushed down to the T2 scan. But this happens even with or without the JoinPushTransitivePredicatesRule.
Mike On Wed, Aug 30, 2017 at 9:39 PM, Gautam Parai <[email protected]> wrote: > Hi Michael, > > > Do you see a filter pushdown with the following query? > > select * from T1 inner join T2 on T1.C = T2.C1 where T2.C2 > 0; > > > Gautam > > ________________________________ > From: Michael Alexeev <[email protected]> > Sent: Wednesday, August 30, 2017 5:58:04 PM > To: [email protected] > Subject: JoinPushTransitivePredicatesRule > > Hi All, > > Consider a query > > select * from T1 inner join T2 on T1.C = T2.C1 and T2.C2 > 0; > > I would expect that the JoinPushTransitivePredicatesRule would push the > T2.C2 > > 0 expression as a filter down to the inner scan over the T2 table, right? > > But, for whatever reason, the inferred RelOptPredicateList > <https://calcite.apache.org/apidocs/org/apache/calcite/ > plan/RelOptPredicateList.html> > has > both left and right predicate lists empty inside > JoinPushTransitivePredicatesRule.onMatch call thus the whole original ON > expression stays at the join node. > > Is my expectation wrong? If so, is there a way to push inner/outer filters > to corresponding join nodes? > > Thanks, > Mike >
