You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/11/12 18:39:00 UTC

[jira] [Updated] (CALCITE-4399) Check if HepPlanner should allow to register non-nullable column as an equivalent to nullable

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

Vladimir Sitnikov updated CALCITE-4399:
---------------------------------------
    Summary: Check if HepPlanner should allow to register non-nullable column as an equivalent to nullable  (was: Check if HepPlanner should be allowed to register non-nullable column as an equivalent to nullable)

> Check if HepPlanner should allow to register non-nullable column as an equivalent to nullable
> ---------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4399
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4399
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.26.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>
> org.apache.calcite.test.RelOptRulesTest#testReduceNullableToNotNull2
> {noformat}
> java.lang.AssertionError: Cannot add expression of different type to set:
> set type is RecordType(INTEGER NEWCOL) NOT NULL
> expression type is RecordType(INTEGER NOT NULL NEWCOL) NOT NULL
> set is rel#9105:LogicalProject.(input=HepRelVertex#9104,exprs=[+($0, CASE(=('a', 'a'), 1, null:INTEGER))])
> expression is LogicalProject(NEWCOL=[+($0, 1)])
>   LogicalTableScan(table=[[CATALOG, SALES, EMP]])
> 	at org.apache.calcite.plan.RelOptUtil.verifyTypeEquivalence(RelOptUtil.java:380)
> 	at org.apache.calcite.plan.hep.HepRuleCall.transformTo(HepRuleCall.java:58)
> 	at org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:268)
> 	at org.apache.calcite.plan.RelOptRuleCall.transformTo(RelOptRuleCall.java:283)
> 	at org.apache.calcite.rel.rules.ReduceExpressionsRule$ProjectReduceExpressionsRule.onMatch(ReduceExpressionsRule.java:310)
> 	at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:333)
> 	at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:542)
> 	at org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:407)
> 	at org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:243)
> 	at org.apache.calcite.plan.hep.HepInstruction$RuleInstance.execute(HepInstruction.java:127)
> 	at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:202)
> 	at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:189)
> 	at org.apache.calcite.test.RelOptTestBase.checkPlanning(RelOptTestBase.java:122)
> 	at org.apache.calcite.test.RelOptTestBase.access$000(RelOptTestBase.java:64)
> 	at org.apache.calcite.test.RelOptTestBase$Sql.check(RelOptTestBase.java:303)
> 	at org.apache.calcite.test.RelOptTestBase$Sql.check(RelOptTestBase.java:282)
> 	at org.apache.calcite.test.RelOptRulesTest.checkReduceNullableToNotNull(RelOptRulesTest.java:2854)
> 	at org.apache.calcite.test.RelOptRulesTest.testReduceNullableToNotNull2(RelOptRulesTest.java:2871)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)