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

Simplification may have not fully simplified IS NOT NULL expressions

    XMLWordPrintableJSON

    Details

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

      Description

      CALCITE-2929 have added a safety check to avoid simplifying problematic cases.

      The safety check apparently misses some kinds, for example: UNARY_PLUS

        @Test public void testIsNullSimplificationWithUnaryPlus() {
          RexNode expr =
              isNotNull(coalesce(unaryPlus(vInt(1)), vIntNotNull(0)));
          RexNode s = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN);
      
          assertThat(expr.isAlwaysTrue(), is(true));
          assertThat(s, is(trueLiteral));
        }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kgyrtkirk Zoltan Haindrich
                Reporter:
                kgyrtkirk Zoltan Haindrich
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m