You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jinfeng Ni (JIRA)" <ji...@apache.org> on 2014/07/09 23:59:06 UTC
[jira] [Created] (OPTIQ-340) Optiq IllegalArgumentException when
push complex expressions into join conditions.
Jinfeng Ni created OPTIQ-340:
--------------------------------
Summary: 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
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)