JDBC: Support context parameters sent through connection string
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
In JDBC there are two common ways of setting connection properties, which are used to pass query context parameters through to Druid SQL and Druid native queries. (Additionally, some of them, like "user" and "password", are used for internal purposes by the driver.)
1. Properties object "props" passed into `DriverManager.getConnection(url, props)`.
2. Semicolon-separated key=value pairs appended to the "url" parameter of the same method.
Today (0.18.0) Druid supports (1) but not (2). It would be good to support (2) as well, since while some third-party JDBC applications support both methods of specifying properties, some only support (2).
This is something Avatica should be handling for us, but there is a bug that prevents it from working: https://issues.apache.org/jira/browse/CALCITE-4121.
Contributor guide
Research direction
Start at the JDBC DriverManager.getConnection(url, props) entry point and trace how semicolon-separated properties in the URL are handled through Avatica. Read the linked CALCITE-4121 issue to understand the blocking bug, then verify that URL properties reach Druid SQL and native query context while preserving internal properties such as user and password.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100