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

Subquery unnesting with count aggregates

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 11.1.2, 12.0, 11.2.2
    • None
    • Query Engine
    • None

    Description

      A query such as:

      SELECT pm1.g1.e1, pm1.g1.e2, /*+ MJ */ (select count(*) from pm1.g2 where e1 = pm1.g1.e1) FROM pm1.g1
      

      Where the subquery contains aggregates without a group by will produce a join plan such that a group by is added to account for the projection of the e1 value for the join predicate. However that will change the value from 0 to null for counts from pm1.g2 where there are no matching rows.

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            rhn-engineering-shawkins Steven Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: