yunmaoQu commented on issue #44884:
URL: https://github.com/apache/arrow/issues/44884#issuecomment-2509016750
Based on the provided code and tests in the repository, the correct
parameter for providing a user ID in the Apache Arrow Flight SQL JDBC driver is
**`user`**, not `username`.
### Evidence from the Code:
1. **ArrowFlightJdbcDriver.java:**
In the implementation of the `getUrlsArgs` method, the URL parameters are
parsed and stored in a `Properties` object using the
`ArrowFlightConnectionProperty` enum. The `ArrowFlightConnectionProperty`
defines parameters like `HOST` and `PORT`, but there is no mention of a
parameter called `username`. The property for providing credentials is
consistently referred to as `user`.
2. **ArrowFlightJdbcDriverTest.java:**
The test cases use `user` when setting up connection properties:
```java
dataSource.getProperties(dataSource.getConfig().getUser(),
dataSource.getConfig().getPassword())
```
Here, the `dataSource.getConfig().getUser()` method is used, which
corresponds to the `user` property.
3. **UrlParser and UrlParserTest:**
The `UrlParser` class parses key-value pairs in the URL, and the test
cases confirm that valid parameters like `user` and other connection properties
(e.g., `key1`, `key2`) are processed correctly. No tests or examples use
`username`.
4. **Documentation Mismatch:**
If the documentation shows `username` as a parameter in the example URL,
it is likely a mistake. The repository code does not recognize `username` as a
valid parameter for authentication.
### Suggested Resolution:
I THINK:The documentation should be updated to replace `username` with
`user` in the example URL. This change will align the documentation with the
actual behavior of the Apache Arrow Flight SQL JDBC driver.
### Correct Example:
The connection URL should use `user` like this:
```
jdbc:arrow-flight-sql://<host>:<port>/?user=<your-username>&password=<your-password>
```
--
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]