Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-1685

error happens while execute a sql contains '?' using Statement

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v1.2, v1.5.1
    • v1.3.1, v1.5.2
    • Driver - JDBC
    • None

    Description

      Exception happen :
      java.sql.SQLException: Error while executing SQL "select * from test_table where url not in ('http://a.b.com/?a=b')": org.apache.kylin.jdbc.KylinStatement cannot be cast to org.apache.kylin.jdbc.KylinPreparedStatement
      at org.apache.kylin.jdbc.KylinResultSet.execute(KylinResultSet.java:54)
      at org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:566)
      at org.apache.kylin.jdbc.KylinMeta.prepareAndExecute(KylinMeta.java:79)
      at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:571)
      at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:135)
      at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:186)
      at org.apache.kylin.jdbc.DriverTest.testStatementWithQuestionMask(DriverTest.java:79)

      This caused by kylin jdbc will take a sql contain '?' as PreparedStatement and cast as it.

      Attachments

        Activity

          People

            feng_xiao_yu fengYu
            feng_xiao_yu fengYu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: