avantgardnerio commented on code in PR #33961:
URL: https://github.com/apache/arrow/pull/33961#discussion_r1092482633
##########
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));
Review Comment:
These assertions pass against our server implementation, which is part #1 of
this PR.
--
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]