Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-3149

Bind variable issue in ODBC

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • Impala 2.2, Impala 2.3.0
    • Not Applicable
    • Clients
    • None

    Description

      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

      SELECT COUNT(address.address_id) 
      , address.country
      FROM quest_stage.address address 
      GROUP BY address.country 
      HAVING (COUNT(address.address_id) > ?)
      

      It returns the following error
      Error:

      [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
      

      Bind variable works correctly in WHERE clause. Also the query returns correct result if we use a number instead of the bind variable.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Jirka_impala_01b6 Jiri Novak
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: