-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Describe the bug, including details regarding any error messages, version, and platform.
Arrow Version 13.0.0
I use the following code to connect to flight sql server to execute query, two unexpected behaviors occur:
acceptPutPreparedStatementUpdateof the flight server is called, andflightStream.getRoot().getRowCount() == 0is true. but query is not an Update statement.
- Shouldn't
acceptPutPreparedStatementUpdatebe called?
I'm using Python DB-API 2.0 cursor.execute(sql) and cursor.fetchallarrow() which does not call acceptPutPreparedStatementUpdate after calling createPreparedStatement.
- The FlightEndpoint returned by
getFlightInfoPreparedStatementis another flight server, but not fetch result from other flight server. Instead,getStreamStatementof the current flight server is called.
- Why is there no fetch result from another flight server?
- Why is
getStreamStatementcalled instead ofgetStreamPreparedStatement?
Actual calling sequence:
createPreparedStatementacceptPutPreparedStatementUpdategetFlightInfoPreparedStatementgetStreamStatementclosePreparedStatement
I'm looking for help, thanks!
Connection conn = null;
Statement stmt = null;
Class.forName("org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver");
try {
conn = DriverManager.getConnection("jdbc:arrow-flight-sql://xx:xx?useServerPrepStmts=false&cachePrepStmts=true&useSSL=false&useEncryption=false", "root", "");
String sql = "select * from clickbench.hits limit 50";
stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
int rowNum = rs.getRow();
System.out.println(rowNum);
rs.close();
stmt.close();
conn.close();
} catch (SQLException e) {
throw new RuntimeException(e);
}
Component(s)
FlightRPC