You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "dbolo (Jira)" <ji...@apache.org> on 2019/12/31 09:42:00 UTC

[jira] [Commented] (IMPALA-7041) Incorrect error messages when using bind variables in ODBC

    [ https://issues.apache.org/jira/browse/IMPALA-7041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17006015#comment-17006015 ] 

dbolo commented on IMPALA-7041:
-------------------------------

I got the same issue. Have you resolved it?

> Incorrect error messages when using bind variables in ODBC
> ----------------------------------------------------------
>
>                 Key: IMPALA-7041
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7041
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Clients
>    Affects Versions: Impala 2.10.0
>         Environment: Windows ODBC driver 2.5.41.1029
>            Reporter: Richard Sinden
>            Priority: Minor
>
> If I run a valid query via ODBC/ADO.NET using a bind variable then it works fine
> e.g.
>  
> {code:java}
> SELECT destination, starttime, duration, entity
> FROM valid_table 
> WHERE entity = ?
> {code}
> However, if I make the query invalid by making the table name or a column name incorrect then I get the following error which appears to suggest that the ? character is the problem.
>  
>  
> {noformat}
> ERROR [HY000] [Cloudera][ImpalaODBC] (110) Error while executing a query in Impala: [HY000] : AnalysisException: Syntax error in line 3:
> WHERE entity = ?
>                ^
> Encountered: Unexpected character
> Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, REPLACE, TRUNCATE, TRUE, IDENTIFIER{noformat}
> If I replace the bind variable with a literal string:
>  
>  
> {code:java}
> SELECT destination, starttime, duration, entity
> FROM invalid_table 
> WHERE entity = '1234'
> {code}
> Then I get the error I would expect:
>  
>  
> {noformat}
> ERROR [HY000] [Cloudera][ImpalaODBC] (110) Error while executing a query in Impala: [HY000] : AnalysisException: Could not resolve table reference: 'invalid_table'{noformat}
> I'm working on a system where each deployment has some custom data sets and the table name can be configured by the user. If this is incorrect for any reason then this error message makes the issue very difficult for them to debug.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org