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

count of group by column return 1 over join

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 8.3
    • 7.0
    • Query Engine
    • None
    • Workaround Exists
    • 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.

      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.

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

                Created:
                Updated:
                Resolved: