Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-2647 Add an impala translator
  3. TEIID-2916

HIVE2: Teiid didn't translate the SQL correctly for numeric field

    XMLWordPrintable

    Details

      Description

      Teiid didn't translate the SQL correctly for numeric field. It uses identifier "decimal" in the SQL which is not supported by the driver.

      Original Query:

      select "store_sales",
      "store_state",
      "store_country"
      from "Impala"."sales_new"
      where "store_sales" between 1.5 and 10
      limit 1000

      After Translation (Teiid):

      SELECT g_0.store_sales AS c_0, g_0.store_state AS c_
      1, g_0.store_country AS c_2 FROM sales_new g_0 WHERE cast(g_0.store_sales AS
      decimal) >= 1.5 AND cast(g_0.store_sales AS decimal) <= 10 LIMIT 1000

      "decimal" is not supported identifier in HIVE driver:

      Encountered: IDENTIFIER
      Expected: BIGINT, BOOLEAN, DATE, DATETIME, REAL, FLOAT, INTEGER, SMALLINT,
      STRING, TIMESTAMP, TINYINT

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rareddy Ramesh Reddy
                Reporter:
                ichanjasper Ivan Chan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: