HackPoint opened a new issue, #121:
URL: https://github.com/apache/arrow-java/issues/121

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ```
   protected AvaticaParameter getParameter(int param) throws SQLException {
           try {
               return 
(AvaticaParameter)this.getSignature().parameters.get(param - 1);
           } catch (IndexOutOfBoundsException var3) {
               throw 
AvaticaConnection.HELPER.toSQLException(AvaticaConnection.HELPER.createException("parameter
 ordinal " + param + " out of range"));
           }
       }
   ```
   
   Getting this exception
   
   My code:
   ```
   public static void handleSqlStatements() throws SQLException {
           String url = 
"jdbc:arrow-flight://localhost:5000;useEncryption=false;useServerPrepStmts=false;";
           String sql = "select * from MixedTypeDB.`Table` where OID=?"; // 
Example SQL query
           System.out.println("SQL query: " + sql); // Debugging: Log the query
   
           try (var connection = DriverManager.getConnection(url)) {
               ArrowFlightPreparedStatement pstmt = 
(ArrowFlightPreparedStatement)connection.prepareStatement(sql);
               ParameterMetaData metadata = pstmt.getParameterMetaData();
               pstmt.setInt(1, 12345); // crashing here
   
               System.out.println("Executing SQL query: " + sql);
   
               try (final ResultSet rs = pstmt.executeQuery()) {
               }
           } catch (SQLException e) {
               e.printStackTrace();
           }
   }
   ```
   
   ```
   <dependency>
               <groupId>org.apache.arrow</groupId>
               <artifactId>flight-sql-jdbc-driver</artifactId>
               <version>13.0.0</version>
           </dependency>
   ```
   
   ### Component(s)
   
   Java


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to