[
https://issues.apache.org/jira/browse/CALCITE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296998#comment-14296998
]
Vladimir Sitnikov commented on CALCITE-571:
-------------------------------------------
Julian,
I suppose your fix is a workaround.
I prefer we would either create a new ticket or at least leave a relevant
comment in such cases.
It would be nice if Calcite could propagate dpetno=200 to the e2, however the
expected plan you've added does not include that.
{code:sql}
select e1.sal from (select * from emp where deptno = 200) as e1
where e1.deptno in (
select e2.deptno from emp e2 where e2.sal = 100){code}
> ReduceExpressionsRule tries to reduce SemiJoin condition to non-equi condition
> ------------------------------------------------------------------------------
>
> Key: CALCITE-571
> URL: https://issues.apache.org/jira/browse/CALCITE-571
> Project: Calcite
> Issue Type: Bug
> Reporter: Jesus Camacho Rodriguez
> Assignee: Julian Hyde
> Fix For: 1.0.0-incubating
>
>
> Hive's unit test that reproduces the problem: vector_mapjoin_reduce
> Stack Trace:
> {noformat}
> Unexpected exception java.lang.AssertionError
> at org.apache.calcite.rel.core.SemiJoin.copy(SemiJoin.java:82)
> at org.apache.calcite.rel.core.SemiJoin.copy(SemiJoin.java:42)
> at
> org.apache.calcite.rel.rules.ReduceExpressionsRule$3.onMatch(ReduceExpressionsRule.java:224)
> at
> org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:326)
> at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:515)
> at
> org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392)
> at
> org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:285)
> at
> org.apache.calcite.plan.hep.HepInstruction$RuleCollection.execute(HepInstruction.java:72)
> at
> org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
> at
> org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)