You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "lidavidm (via GitHub)" <gi...@apache.org> on 2023/04/17 23:26:56 UTC
[GitHub] [arrow-adbc] lidavidm commented on a diff in pull request #572: feat(java/driver/flight-sql): add basic auth
lidavidm commented on code in PR #572:
URL: https://github.com/apache/arrow-adbc/pull/572#discussion_r1169349033
##########
java/driver/flight-sql-validation/src/test/java/org/apache/arrow/adbc/driver/flightsql/FlightSqlQuirks.java:
##########
@@ -48,6 +50,8 @@ public AdbcDatabase initDatabase(BufferAllocator allocator) throws AdbcException
final Map<String, Object> parameters = new HashMap<>();
parameters.put(AdbcDriver.PARAM_URL, url);
+ parameters.put("adbc.username", System.getenv(FLIGHT_SQL_USER_ENV_VAR));
Review Comment:
As mentioned, let's use just "username" for consistency with other implementations
##########
java/driver/flight-sql/src/main/java/org/apache/arrow/adbc/driver/flightsql/FlightSqlConnection.java:
##########
@@ -62,7 +74,51 @@ public class FlightSqlConnection implements AdbcConnection {
throw new RuntimeException(e);
}
})
- .build(location -> FlightClient.builder(allocator, location).build());
+ .build(
+ loc -> {
+ FlightClient flightClient =
+ FlightClient.builder(allocator, loc)
+ .intercept(
+ new FlightClientMiddleware.Factory() {
Review Comment:
nit: could we pull this out into a static inner class instead of having it inline here?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org