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

Syntax error on parameterized Query

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Impala 2.9.0
    • None
    • Clients
    • None
    • windows10 odbc driver 2.6.16
    • ghx-label-8

    Description

      I have an issue the same as IMPALA-9750 Syntax error on parameterized Query - ASF JIRA (apache.org) Tim Armstrong 

      ERROR [42000] [Cloudera][ImpalaODBC] (360) Syntax error occurred during query execution: [HY000] : AnalysisException: Syntax error in line 1:

      ...lt.fdc_lot_run where eqid=? and year=2021 and month=10...
                                  ^
      Encountered: Unexpected character
      Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, REPLACE, TRUNCATE, TRUE, IDENTIFIER

      CAUSED BY: Exception: Syntax error

       

      dev environment

      • windows 10
      • .net framework C# 4.8
      • impala odbc driver 2.6.16

       

      test code

         var command = (System.Data.Odbc.OdbcCommand)conn.CreateCommand();
                      command.CommandText = "select * from default.fdc_lot_run where eqid=? and year=2021 and month=10 and day=15";
                      command.Parameters.Add("eqid", System.Data.Odbc.OdbcType.VarChar).Value = "CACMPW01";

                      var rs = command.ExecuteReader(); // here exception...
                      var x = rs.Read();
                      rs.Close();

       

       failed in parameterized query.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            yestaro CWYU

            Dates

              Created:
              Updated:

              Slack

                Issue deployment