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

Hive/Impala translator - select distinct and gorup by is not supported in one query

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.0, 8.12.5
    • 8.12.x
    • JDBC Connector
    • None

      Hive and Impala do not support combination of SELECT DISTINCT and GROUP BY in one SQL query.

      Messages of exceptions:
      Impala - cannot combine SELECT DISTINCT with aggregate functions or GROUP BY
      Hive - SELECT DISTINCT and GROUP BY can not be in the same query.

      DDL:

      CREATE VIEW Agg2 (StringNum string)
        AS SELECT BQT1.SmallA.StringNum FROM BQT1.SmallA GROUP BY BQT1.SmallA.StringNum HAVING BQT1.SmallA.StringNum = '1';
      

      Query:

      SELECT DISTINCT StringNum FROM VQT.Agg2
      

              rhn-engineering-shawkins Steven Hawkins
              jdurani Juraj DurĂ¡ni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: