avantgardnerio commented on code in PR #33961:
URL: https://github.com/apache/arrow/pull/33961#discussion_r1092483636
##########
java/flight/flight-sql-jdbc-driver/src/test/java/org/apache/arrow/driver/jdbc/ArrowFlightJdbcDriverTest.java:
##########
@@ -133,6 +126,28 @@ public void testShouldConnectWhenProvidedWithValidUrl()
throws Exception {
}
}
+ @Test
+ public void testParameters() throws Exception {
+ final Driver driver = new ArrowFlightJdbcDriver();
+ Properties props = new Properties();
+ props.setProperty("user", "admin");
+ props.setProperty("password", "password");
+ props.setProperty("useEncryption", "false");
+ String conString = "jdbc:arrow-flight://127.0.0.1:50060";
+ try (Connection con = driver.connect(conString, props); Statement stmt =
con.createStatement()) {
+ try {
+ stmt.execute("create table person (id int, name varchar, primary
key(id))");
+ } catch (Exception ignored) {}
+ try(PreparedStatement ps = con.prepareStatement("select * from person
where id=$1")) {
+ ParameterMetaData md = ps.getParameterMetaData();
+ assertEquals(1, md.getParameterCount());
+ assertEquals("Int", md.getParameterTypeName(1));
+ ps.setInt(1, 1);
Review Comment:
This does not seem to affect `parameterBindingRoot` so the parameters are
not sent back to the server.
I am a bit lost and would appreciate some help following the flow of how
those parameters should be sent and why they are not going through at present.
--
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]