splitJoinCondition seems to be the right place. I’m not sure I’d have "List<Integer> filterNulls”; I’d have “List<Boolean> filterNulls” instead, I think, to handle
select * from t1 join t2 on t1.c0 = t2.c0 and t1.c0 is not distinct from t2.c1 Note that t1.c0 is compared using = in one case, and using is-not-distinct-from in the other case. So I’d set filterNulls = [true, false]. > On Apr 14, 2016, at 9:50 AM, Venki Korukanti <[email protected]> > wrote: > > Hi, > > In Drill, we have an improvement request to handle null equality joins ( > DRILL-4539 <https://issues.apache.org/jira/browse/DRILL-4539>). Currently > Drill relies on RelOptUtil.splitJoinCondition [1] and [2] to split the join > condition into equi-join condition and remained. We tested by modifying > RelOptUtil.splitJoinCondition to identify null equality condition and > convert it into IS NOT DISTINCT FROM and it works fine. Changes are [3]. > > I am wondering whether modifying the RelOptUtil.splitJoinCondition to > handle null equality condition is the right way to add the functionality in > Calcite. Is there any other place where we can convert the null equality > condition into IS NOT DISTINCT FROM? > > > [1] > https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java#L789 > > [2] > https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java#L856 > > [3] > https://github.com/vkorukanti/calcite/commit/ee2292455447bed082438f4eb9bef16025179a44 > > Thanks > Venki
