Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3566

Calling Connection.prepareStatement throws a ClassCastException

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 1.2.0
    • Client - JDBC
    • None

    Description

      Git Commit # : 65935db8d01b95a7a3107835d7cd5e61220e2f84

      I am hitting the below exception when using Connection.prepareStatement without binding any parameters

      PreparedStatement stmt = con.prepareStatement(DRILL_SAMPLE_QUERY);
      
      Exception in thread "main" java.lang.ClassCastException: org.apache.drill.jdbc.impl.DrillJdbc41Factory$DrillJdbc41PreparedStatement cannot be cast to org.apache.drill.jdbc.impl.DrillStatementImpl
      at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newResultSet(DrillJdbc41Factory.java:106)
      at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newResultSet(DrillJdbc41Factory.java:1)
      at net.hydromatic.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:397)
      at net.hydromatic.avatica.AvaticaPreparedStatement.executeQuery(AvaticaPreparedStatement.java:77)
      at com.incorta.trails.DrillTest.query(DrillTest.java:33)
      at com.incorta.trails.DrillTest.main(DrillTest.java:12)
      

      Attachments

        Issue Links

        Activity

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

          People

            dsbos Daniel Barclay
            rkins Rahul Kumar Challapalli
            Rahul Kumar Challapalli Rahul Kumar Challapalli
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment