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

Simplification: Remove redundant IS TRUE checks

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.19.0
    • Component/s: 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

              • Assignee:
                kgyrtkirk Zoltan Haindrich
                Reporter:
                kgyrtkirk Zoltan Haindrich
              • Votes:
                0 Vote for this issue
                Watchers:
                4 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