You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2014/08/25 21:10:58 UTC

[jira] [Closed] (OPTIQ-340) Optiq IllegalArgumentException when push complex expressions into join conditions.

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

Julian Hyde closed OPTIQ-340.
-----------------------------


Close issues resolved in release 0.9.0-incubating (2014-08-25).

> Optiq IllegalArgumentException when push complex expressions into join conditions.
> ----------------------------------------------------------------------------------
>
>                 Key: OPTIQ-340
>                 URL: https://issues.apache.org/jira/browse/OPTIQ-340
>             Project: Optiq
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: Julian Hyde
>             Fix For: 0.9.0-incubating
>
>
> Optiq SqlToRelConverter will throw IllegalArgumentException, when join conditions in the on clause contains a complex expression, in stead of a single column. For example ( the query itself is not a meaningful one). 
> select e."deptno", d."deptno"
> from "hr"."emps" as e
>   join "hr"."depts" as d
>   on ( e."deptno" + 1 - 1 = d."deptno" + 2 - 2  and
>        e."deptno" + 10 - 10 = d."deptno" + 20 - 20 )
> Optiq is trying to create projects for complex expression on both sides of join operator, and push project past the join operator. 
>                                   
>                                                             Join   (#1 = # 4 and #2 = #5) 
>                                                    /                                   \
>              Proj ( deptno, deptno+1-1, deptno +10-10)    Proj ( deptno, deptno+2-1, deptno +20-20)
> However, in SqlRelConverter:pushDownJoinConditions(), the index for the new created expressions are not maintained properly, which lead to the IllegalArgumentException.
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)