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

count of group by column return 1 over join

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 7.0
    • Fix Version/s: 8.3
    • Component/s: Query Engine
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use count instead of count(col) and if col can be null, then explicitly filter them with a "WHERE col IS NOT NULL" check.

      Show
      Use count instead of count(col) and if col can be null, then explicitly filter them with a "WHERE col IS NOT NULL" check.

      Description

      A query of the form:

      select e1, count(e1) from pm1.g1, (select 1 from pm1.g2 limit 1) x group by e1

      Will fail to return the proper count for e1 as the decomposition is erroneously considering the decomposed count aggregate as unnecessary.

        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: