[teiid-issues] [JBoss JIRA] (TEIID-2916) HIVE2: Teiid didn't translate the SQL correctly for numeric field

Steven Hawkins (JIRA) issues at jboss.org
Thu Apr 3 06:05:13 EDT 2014


     [ https://issues.jboss.org/browse/TEIID-2916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Hawkins updated TEIID-2916:
----------------------------------

                    Parent: TEIID-2647
    Workaround Description:   (was: Run simple query with Teiid against HIVE2 with contains numeric fields:

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

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

CAUSED BY: Exception: Syntax error
        at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:161)
        at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:149)
        at
org.apache.hive.jdbc.HivePreparedStatement.executeImmediate(HivePreparedStatement.java:187)
        at
org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:149)
        at
org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123))
                Issue Type: Sub-task  (was: Bug)

    
> HIVE2:  Teiid didn't translate the SQL correctly for numeric field
> ------------------------------------------------------------------
>
>                 Key: TEIID-2916
>                 URL: https://issues.jboss.org/browse/TEIID-2916
>             Project: Teiid
>          Issue Type: Sub-task
>          Components: Query Engine
>    Affects Versions: 8.7
>         Environment: HIVE2 with Teiid
>            Reporter: Ivan Chan
>            Assignee: Steven Hawkins
>              Labels: Teiid
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list