Is there any plan to support sort-merge join for non-equi join? I have a try to manually apply the sort-merge join rule for a theta join, but it fails for some other problems. I found a related JIRA issue,see here : https://issues.apache.org/jira/browse/CALCITE-2592?jql=project%20%3D%20CALCITE%20AND%20status%20%3D%20Open%20AND%20text%20~%20%22EnumerableMergeJoin%22
Hongze Zhang <[email protected]> 于2019年4月1日周一 下午12:24写道: > Sorry I made a mistake : (. It seems that the rule adds filters > actively[1] and does not accepts cartesian joins[2]. Besides the effects > should be the same. > > P.S. Correct a typo from my first email: equal join -> cartesian join > > Hongze > > [1] > > https://github.com/apache/calcite/blob/d7946a94adfd2e788f5d324910944dd65dab11ee/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableMergeJoinRule.java#L93-L110 > [2] > > https://github.com/apache/calcite/blob/d7946a94adfd2e788f5d324910944dd65dab11ee/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableMergeJoinRule.java#L59-L61 > > ------ Original Message ------ > From: "Hongze Zhang" <[email protected]> > To: [email protected] > Sent: 2019/4/1 12:00:04 > Subject: Re: Is sort-merge join rule supports a non-equi join? > > >As far as you can see, the rule doesn't currently support non-equal > >join. > > > >While you execute a SQL with non-equal join conditions, the rule can > >only handle the equal join generated by JoinExtractFilterRule[1]. So > >AFAIK you are not able to receive performance benefits by this rule so > >far unless you have sorted join input already. > > > >Best, > >Hongze > > > > > >[1] > > > https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/rel/rules/JoinExtractFilterRule.java > > > >------ Original Message ------ > >From: "周来" <[email protected]> > >To: [email protected] > >Sent: 2019/4/1 11:26:48 > >Subject: Is sort-merge join rule supports a non-equi join? > > > >>I want to fire a sort-merge join rule to improve the performance for a > >>theta join, > >>but I found the comment of EnumerableMergeJoinRule.java says > >>`// EnumerableMergeJoin only supports inner join. > >> (It supports non-equi join, using a post-filter; see below.)`. > >> > >>could someone tell me how to fire the rule for a non-equi join? > >>
