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

Patrick Szalapski commented on IMPALA-3149:
-------------------------------------------

I've simplified my query as much as possible.  I get the "unexpected character" 
error on this query over ODBC using Cloudera ODBC driver 2.05.41.1029 for 
Windows.

{{with nextMatchId as (}}
{{    select min(match_id) as match_id}}
{{    from user}}
{{    where user_id = ?}}
{{) }}
{{select c.*}}
{{from candidate c}}
{{join nextMatchId on nextMatchId.match_id=c.match_id}}

??System.Data.Odbc.OdbcException??
??  HResult=0x80131937??
??  Message=ERROR [HY000] [Cloudera][ImpalaODBC] (110) Error while executing a 
query in Impala: [HY000] : AnalysisException: Syntax error in line 5:??
??    where user_id = ???
??                    ^??
??Encountered: Unexpected character??
??Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, 
REPLACE, TRUNCATE, TRUE, IDENTIFIER??

> Bind variable issue in ODBC
> ---------------------------
>
>                 Key: IMPALA-3149
>                 URL: https://issues.apache.org/jira/browse/IMPALA-3149
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Clients
>    Affects Versions: Impala 2.2, Impala 2.3.0
>            Reporter: Jiri Novak
>            Assignee: Syed A. Hashmi
>            Priority: Minor
>
> For some reason Cloudera Impal does not recognize bind variable in HAVING 
> clause.
> If we execute the following simple query using .Net and ADO.Net
> {code:sql}
> SELECT COUNT(address.address_id) 
> , address.country
> FROM quest_stage.address address 
> GROUP BY address.country 
> HAVING (COUNT(address.address_id) > ?)
> {code}
> It returns the following error
> Error:
> {noformat}
> [Cloudera][ImpalaODBC] (110) Error while executing a query in Impala: [HY000] 
> : AnalysisException: Syntax error in line 5:
> HAVING (COUNT(address.address_id) > ?)
> ^
> Encountered: Unexpected character
> Expected: CASE, CAST, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, TRUE, IDENTIFIER
> {noformat}
> Bind variable works correctly in WHERE clause. Also the query returns correct 
> result if we use a number instead of the bind variable.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to