[ https://issues.apache.org/jira/browse/CALCITE-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
MinJi Kim updated CALCITE-1289: ------------------------------- Description: RexUtil.simplify() returns incorrect type information if the RexNode is a CASE(CONDITION, TRUE, FALSE). In this case, the CASE RexNode is a Boolean with isNullable == false. But, with the simplify, RexUtil.simplify returns CONDITION. When CONDITION has isNullable == true, the returned RexNode does not match the row type and fails to transform (vice versa). (was: RexUtil.simplify() returns incorrect type information if the RexNode is a CASE(CONDITION, TRUE, FALSE). In this case, the CASE RexNode is a Boolean with isNullable == false. But, with the simplify, RexUtil.simplify returns CONDITION. When CONDITION has isNullable == true, the returned RexNode does not match the row type and fails to transform.) > RexUtil.simplifyCase() should account for nullability > ----------------------------------------------------- > > Key: CALCITE-1289 > URL: https://issues.apache.org/jira/browse/CALCITE-1289 > Project: Calcite > Issue Type: Bug > Components: core > Reporter: MinJi Kim > Assignee: Julian Hyde > > RexUtil.simplify() returns incorrect type information if the RexNode is a > CASE(CONDITION, TRUE, FALSE). In this case, the CASE RexNode is a Boolean > with isNullable == false. But, with the simplify, RexUtil.simplify returns > CONDITION. When CONDITION has isNullable == true, the returned RexNode does > not match the row type and fails to transform (vice versa). -- This message was sent by Atlassian JIRA (v6.3.4#6332)