Skip to content

feat(bigquery-jdbc): parse endpoint overrides and proxy settings from URL authority#13377

Open
keshavdandeva wants to merge 2 commits into
mainfrom
jdbc/parse-url
Open

feat(bigquery-jdbc): parse endpoint overrides and proxy settings from URL authority#13377
keshavdandeva wants to merge 2 commits into
mainfrom
jdbc/parse-url

Conversation

@keshavdandeva
Copy link
Copy Markdown
Contributor

b/515051004

Added support for extracting endpoint overrides and proxy routing configurations directly from the authority segment (the host part preceding the first semicolon ;) of the JDBC connection URL.

  • Endpoint Overrides: If the authority segment starts with http:// or https://, it is mapped to the EndpointOverrides property (BIGQUERY=...).
  • Proxy Settings: If the authority does not contain a scheme, it is parsed as a proxy (e.g., host:port) and mapped to the ProxyHost and ProxyPort properties.
  • Parameter Priority: Properties specified after the semicolon take precedence. In the case of EndpointOverrides, settings from the authority and parameter segments are merged, with parameter values overwriting duplicate keys.

@keshavdandeva keshavdandeva requested review from a team as code owners June 5, 2026 18:23
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces authority parsing in BigQueryJdbcUrlUtility to extract endpoint overrides or proxy host and port configurations directly from the JDBC URL authority section, along with supporting tests. The review feedback correctly points out that the current proxy parsing logic using indexOf(':') will fail for IPv6 addresses. It is recommended to update the parsing logic to handle IPv6 brackets and add corresponding test cases to prevent regressions.

@keshavdandeva
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates BigQueryJdbcUrlUtility to parse the authority part of the JDBC URL, allowing the extraction of endpoint overrides or proxy host and port configuration (including IPv6 addresses). It also adds support for merging multiple endpoint overrides and includes comprehensive unit tests to verify these new parsing capabilities. No review comments were provided, so there is no feedback to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant