You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Pengcheng Xiong (JIRA)" <ji...@apache.org> on 2015/09/29 02:35:05 UTC
[jira] [Created] (CALCITE-902) ReduceExpressionsRule(esp,
PROJECT_INSTANCE) does not work with columns that allow null values
Pengcheng Xiong created CALCITE-902:
---------------------------------------
Summary: ReduceExpressionsRule(esp, PROJECT_INSTANCE) does not work with columns that allow null values
Key: CALCITE-902
URL: https://issues.apache.org/jira/browse/CALCITE-902
Project: Calcite
Issue Type: Bug
Reporter: Pengcheng Xiong
Assignee: Julian Hyde
Repo steps:
{code}
@Test
public void testReduceConstants20() throws Exception {
HepProgram program = new HepProgramBuilder()
.addRuleInstance(ReduceExpressionsRule.PROJECT_INSTANCE)
.addRuleInstance(ReduceExpressionsRule.FILTER_INSTANCE)
.addRuleInstance(ReduceExpressionsRule.JOIN_INSTANCE).build();
checkPlanning(program, "select mgr from emp where mgr=10");
}
{code}
failing info.:
{code}
testReduceConstants20(org.apache.calcite.test.RelOptRulesTest) Time elapsed: 0.019 sec <<< FAILURE!
java.lang.AssertionError: type mismatch:
type1:
INTEGER NOT NULL
type2:
INTEGER
at org.apache.calcite.plan.RelOptUtil.eq(RelOptUtil.java:1664)
at org.apache.calcite.rex.RexUtil.compatibleTypes(RexUtil.java:582)
at org.apache.calcite.rel.core.Project.isValid(Project.java:182)
at org.apache.calcite.rel.core.Project.<init>(Project.java:85)
at org.apache.calcite.rel.logical.LogicalProject.<init>(LogicalProject.java:64)
at org.apache.calcite.rel.logical.LogicalProject.create(LogicalProject.java:123)
at org.apache.calcite.rel.rules.ReduceExpressionsRule$2.onMatch(ReduceExpressionsRule.java:199)
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:255)
at org.apache.calcite.plan.hep.HepInstruction$RuleInstance.execute(HepInstruction.java:125)
at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207)
at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194)
at org.apache.calcite.test.RelOptTestBase.checkPlanning(RelOptTestBase.java:132)
at org.apache.calcite.test.RelOptTestBase.checkPlanning(RelOptTestBase.java:84)
at org.apache.calcite.test.RelOptTestBase.checkPlanning(RelOptTestBase.java:73)
at org.apache.calcite.test.RelOptRulesTest.testReduceConstants20(RelOptRulesTest.java:794)
Results :
Failed tests:
RelOptRulesTest.testReduceConstants20:794->RelOptTestBase.checkPlanning:73->RelOptTestBase.checkPlanning:84->RelOptTestBase.checkPlanning:132 type mismatch:
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)