Driver will throw exception is getObject instead of getString is used to reference the schema column returned by DatabaseMetadata.getTables.
Similar issue can occur with other Resultsets returned by DatabaseMetadata methods.
SingleStore JDBC 1.0.1
ServerSingleStore 7.6.11
public void getTables2() throws SQLException {
try (ResultSet rs = dbMeta.getTables( null, "cert", "%", null)) {
ResultSetMetaData rsMd = rs.getMetaData();
while (rs.next()) {
System.out.println( String.format( "1.cat %s, schema %s table %s", rs.getString(1), rs.getString(2), rs.getString(3)));
System.out.println( String.format( "2.cat %s, schema %s table %s", rs.getObject(1), rs.getString(2), rs.getObject(3)));
}
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
java.lang.IllegalArgumentException: Unexpected datatype NULL
at com.singlestore.jdbc.message.server.ColumnDefinitionPacket.getDefaultCodec(ColumnDefinitionPacket.java:409)
at com.singlestore.jdbc.client.result.Result.getObject(Result.java:463)