Details
-
Bug
-
Status: Resolved
-
Not specified
-
Resolution: Fixed
-
0.3.0
-
None
-
None
-
Windows machine with java
also a Unix VM with scala
Description
Running the following code...
String myprepsql = "select k,s from ajp::temp::ds persons where k >= ? and k <= ?";
HPCCPreparedStatement prepstmt = (HPCCPreparedStatement)connection.prepareStatement(myprepsql);
prepstmt.setLong(1, (long)1);
prepstmt.setLong(2, (long)5);
HPCCResultSet qrs = (HPCCResultSet) ((HPCCPreparedStatement) prepstmt).executeQuery();
while(qrs.next())
The following exception is presented...
java.sql.SQLException: java.lang.Long cannot be cast to java.lang.String
at org.hpccsystems.jdbcdriver.HPCCPreparedStatement.executeQuery(HPCCPreparedStatement.java:108)
When looking at HPCCPreparedStatement, it looks like it tries to cast every parameter into a String.