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

Simplification: Remove redundant IS TRUE checks

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 1.19.0
    • None

    Description

      In case simplifcation is already processing in unknownAsFalse mode, expr IS TRUE is redundant - and may just prevent further optimizations from happening:

        @Test public void testRedundantIsTrue() {
          // in case of unknownAsFalse
          // x is TRUE <=> x
          checkSimplify3(isTrue(vBool(1)),
              "IS TRUE(?0.bool1)",
              "?0.bool1",
              "IS TRUE(?0.bool1)");
        }
      

      there are some further possibilities

      (unknownAsTrue) x is NOT FALSE <=> x
      (unknownAsTrue) x is FALSE <=> not x
      

      Attachments

        Issue Links

          Activity

            People

              kgyrtkirk Zoltan Haindrich
              kgyrtkirk Zoltan Haindrich
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 2h 50m
                  2h 50m