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

HIVE: quote is removed for TIMESTAMP field in where clause

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.7, 8.4.2
    • 8.6
    • Query Engine
    • Hide

      Run the following SQL with HIVE:

      select "the_date",
      "store_sales"
      from "hive2"."sales_seq"
      where ("the_date" > '1970-05-16 00:10:04')

      Teiid generated SQL:

      SELECT g_0.the_date, g_0.store_sales FROM sales_seq g_0 WHERE g_0.the_date > 1970-05-16 00:10:04.0

      Exception:

      Caused by: java.sql.SQLException: Error while processing statement: FAILED:
      ParseException line 1:88 missing EOF at '00' near '16

      Show
      Run the following SQL with HIVE: select "the_date", "store_sales" from "hive2"."sales_seq" where ("the_date" > '1970-05-16 00:10:04') Teiid generated SQL: SELECT g_0.the_date, g_0.store_sales FROM sales_seq g_0 WHERE g_0.the_date > 1970-05-16 00:10:04.0 Exception: Caused by: java.sql.SQLException: Error while processing statement: FAILED: ParseException line 1:88 missing EOF at '00' near '16

    Description

      I am running teiid 8.6 against HIVE. And I found out that quote was removed for TIMESTAMP field in where clause. And it caused java.sql.SQLException: Error while processing statement: FAILED: ParseException line 1:88 missing EOF

      Original SQL:

      select "the_date",
      "store_sales"
      from "hive2"."sales_seq"
      where ("the_date" > '1970-05-16 00:10:04')

      Teiid generated SQL:

      SELECT g_0.the_date, g_0.store_sales FROM sales_seq g_0 WHERE g_0.the_date > 1970-05-16 00:10:04.0

      Exception:

      Caused by: java.sql.SQLException: Error while processing statement: FAILED:
      ParseException line 1:88 missing EOF at '00' near '16'

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            mchantibco Ivan Chan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: