Describe the bug, including details regarding any error messages, version, and platform.
Description
When a TimeStamp is returned in a Flight SQL JDBC ResultSet an exception is throw when accessing the value via getObject(index). It works using getObject(columnName). Below as a simple example of how the problem can be reproduced:
try (varconnection = DriverManager.getConnection("jdbc:arrow-flight://localhost:5000;useEncryption=false");
PreparedStatementcreateStatement = connection.prepareStatement("create table if not exists test (ts timestamp, id bigint)");
PreparedStatementinsertStatement = connection.prepareStatement("insert into test values ('1970-04-01 21:39:50', 2)");
PreparedStatementselectStatement = connection.prepareStatement("select ts from test where id = 2")
) {
createStatement.execute();
insertStatement.executeUpdate();
try (varrs = selectStatement.executeQuery()) {
while (rs.next()) {
// Fails with a not implemented exceptionSystem.out.println(rs.getObject(1)); // worksSystem.out.println(rs.getObject("ts")); }
}
}Here is the stack trace for the getObject(index)
Exception in thread "main" java.lang.RuntimeException: not implemented
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaSite.notImplemented(AvaticaSite.java:422)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaSite.get(AvaticaSite.java:381)
at org.apache.arrow.driver.jdbc.shaded.org.apache.calcite.avatica.AvaticaResultSet.getObject(AvaticaResultSet.java:395)
at JDBCParamTest.runDateTimeTimestampExample(JDBCParamTest.java:91)
at JDBCParamTest.main(JDBCParamTest.java:14)
Version information:
| item | version |
|---|
| Java | Zulu 21.0.8 (ARM) |
| Flight SQL JDBC | 18.3.0 |
| macOS | 15.6 (Apple Silicon) |
Describe the bug, including details regarding any error messages, version, and platform.
Description
When a TimeStamp is returned in a Flight SQL JDBC
ResultSetan exception is throw when accessing the value viagetObject(index). It works usinggetObject(columnName). Below as a simple example of how the problem can be reproduced:Here is the stack trace for the
getObject(index)Version information: