Skip to content

[FlightSQLJDBC] not implemented exception when fetching TimeStamp from ResultSet #818

Description

@jeremyosterhoudt

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:

itemversion
JavaZulu 21.0.8 (ARM)
Flight SQL JDBC18.3.0
macOS15.6 (Apple Silicon)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions