[ 
https://issues.apache.org/jira/browse/CALCITE-631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ng Jiunn Jye updated CALCITE-631:
---------------------------------
    Attachment: [CALCITE-631]JdbcJoinToSupportNonEquiJoin.patch

Fix in attached patch. 

With this fix, the JdbcJoin will be able to support following join 
EquiJoin => select * from tabA inner join tabB on tabA.col1 = tabA.col1
NonEquiJoin => select * from tabA inner join tabB on tabA.col1 > tabA.col1 (and 
other operator)
MixedJoin => select * from tabA inner join tabB on tabA.col1 = tabA.col1 and 
tabA.col2 > tabA.col2

combination of conditions using OR is not supported. 

This fix also resolved CALCITE-597 issue. 
The JdbcJoin.getRows method is updated to return max of leftRowCount, 
rightRowCount. This may not be the final solution but this is required to be 
able to beat EnumerableJoin's cost.

> JdbcJoin to support Non-EquiJoin
> --------------------------------
>
>                 Key: CALCITE-631
>                 URL: https://issues.apache.org/jira/browse/CALCITE-631
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Ng Jiunn Jye
>            Assignee: Julian Hyde
>         Attachments: [CALCITE-631]JdbcJoinToSupportNonEquiJoin.patch
>
>
> Currently, the JdbcJoin only support EquiJoin. ie select * from tab1 inner 
> join tab2 on tab1.col1=tab2.col2
> NonEqui join are not supported in JdbcJoin, thus resulting execution plan 
> which uses EnumerationJoin and EnumerableCalc for joining and not pushing the 
> join down to remote database. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to