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

is not null in case is lost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 1.21.0
    • None
    • core
    • None

    Description

      I found a query like below will lost condition.

      select case when a > 9 and b is not null and b < 8 then c end from tbl

      the "b is not null" get lost.

       

      i.e. add such a test case in RexProgramTest will fail:

      checkSimplifyUnchanged(
      case_(and(gt(vIntNotNull(0), literal(9)), lt(vInt(1), literal(8)), isNotNull(vInt(1))),
      literal(7), literal(6)));

      Attachments

        Activity

          People

            Unassigned Unassigned
            bocaiding bocaiding
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: