Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-1789

'BETWEEN a AND b' clause has a bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • None

    Description

      This is TPC-H q6 in TPC-H Reference document.

      select
      sum(l_extendedprice*l_discount) as revenue
      from
      lineitem
      where
      l_shipdate >= date '1994-01-01'
      and l_shipdate < date '1995-01-01'
      and l_discount between 0.06 - 0.01 and 0.06 + 0.01
      and l_quantity < 24;
      

      look this line.

      and l_discount between 0.06 - 0.01 and 0.06 + 0.01
      

      this line make a wrong answer.

      Replaced line

      and l_discount between 0.05 and 0.07
      

      gives me right answer.

      Between Answers of

      and l_discount between 0.06 - 0.01 and 0.06 + 0.01
      

      and

      and l_discount between 0.06 - 0.01 and 0.06
      

      are same.
      I think "BetweenPredicate" has a bug.

      Attachments

        Activity

          People

            eminency Jongyoung Park
            dkhwangbo Dongkyu Hwangbo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: