Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1289

RexUtil.simplifyCase() should account for nullability

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.0
    • Component/s: core
    • Labels:
      None

      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).

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              minjikim MinJi Kim
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: