xinyiZzz opened a new issue, #38742:
URL: https://github.com/apache/arrow/issues/38742
### Describe the usage question you have. Please include as many useful
details as possible.
I use the following code to connect to flight sql server to execute query,
which will call the server's `createPreparedStatement` method, but
unfortunately I unimplemented `createPreparedStatement`.
How to call server's `getFlightInfoStatement` to execute query? I didn't
find the implementation in `FlightSqlClient.java`.
```
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, Java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]