Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1681

Regression (wrong results): Join predicate can be ignored for left-most child in a chain of nested unions.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.3.1, 10.2.1.6
    • 10.1.3.3, 10.2.1.6, 10.3.1.4
    • SQL
    • None
    • Blocker
    • Release Note Needed
    • Regression

    Description

      If Derby chooses to do a join between two FromTables and the right table is a chain of UNIONs, then the optimizer may choose to push the join predicate (if provided) down into the UNION and to both children of every UNION in the chain. But if the predicate cannot be pushed to the children of any of the UNIONs (except the top-level one) the predicate can end up being ignored altogether with respect to that UNION's children. The result is that query execution can return rows that do not satisfy the predicate.

      This is a regression introduced in 10.1.2.4 and thus it affects 10.1.3 and 10.2. I came across this while tracing through code for DERBY-1633.

      Attachments

        1. d1681_test_v2.patch
          5 kB
          A B
        2. d1681_test.patch
          5 kB
          A B
        3. d1681_v1.patch
          3 kB
          A B
        4. DERBY-1681_v1.html
          21 kB
          A B

        Activity

          People

            army A B
            army A B
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: