Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3183

Join sort order altered inappropriately

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 8.4
    • Fix Version/s: 8.7.1, 8.9
    • Component/s: Query Engine
    • Labels:
      None

      Description

      If a merge or other join configuration is chosen and there is a subquery affecting only a side of the join that is to be sorted such that the subquery can be rewritten as a semi/anti-semi join, then the subquery rewrite will alter the intended sort order of the original join. This can result in incorrect results.

      An example query:

      select pm2.g2.e1 from pm1.g1 inner join pm2.g2 on (pm1.g1.e1 = pm2.g2.e1) where pm2.g2.e2 in /*+ mj */ (select count(e2) FROM pm1.g2 group by e1 having e1 < pm2.g2.e3)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                shawkins Steven Hawkins
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: