Skip to content

GH-1528: [JDBC] Ignore case in endpoint location schemes and skip locations without a scheme - #1529

Merged
jbonofre merged 2 commits into
apache:mainfrom
jbonofre:GH-1528-endpoint-location-schemes
Nov 30, 2026
Merged

jbonofre merged 2 commits into
apache:mainfrom
jbonofre:GH-1528-endpoint-location-schemes

Conversation

@jbonofre

@jbonofre jbonofre commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What's Changed

Follow-up to #1527.

  • getStreams and Builder#isConnectionLocation compare endpoint location schemes case-insensitively. Before this, an upper-case GRPC+TLS location was refused on encrypted connections and fetched over plaintext on plaintext connections, and an upper-case location naming the connection was refused with followEndpointLocations=false.
  • A location without a scheme is skipped like other locations that cannot be used, instead of failing the query with a NullPointerException.
  • Updates the GH-38574 comment in getStreams: the FlightClientCache is already shared and tracks unreachable locations, and the connection's own location is now detected when followEndpointLocations is false.

Tests

  • ArrowFlightSqlClientHandlerTest: in both modes, a location without a scheme is skipped, or refused if it is the endpoint's only location. With followEndpointLocations=false, upper-case GRPC+TLS and ARROW-FLIGHT-REUSE-CONNECTION locations are fetched over the connection.
  • ArrowFlightSqlClientHandlerBuilderTest: isConnectionLocation ignores the scheme's case.
  • ConnectionFollowEndpointLocationsTest, over TLS: with followEndpointLocations=false, a grpc+tcp location naming the connection is fetched over the existing TLS connection. By default, an upper-case GRPC+TLS location on another server is followed.

Closes #1528.

…ip locations without a scheme

URI schemes are case-insensitive, so getStreams and
Builder#isConnectionLocation now compare endpoint location schemes in
lower case. A location without a scheme is skipped like other locations
that cannot be used, instead of failing the query with a
NullPointerException.

Also update the GH-38574 comment in getStreams, and test over TLS that
followEndpointLocations=false fetches a grpc+tcp location naming the
connection over the existing TLS connection.

Closes apache#1528.
@jbonofre jbonofre added the bug-fix PRs that fix a big. label Nov 27, 2026
@github-actions github-actions Bot added this to the 20.1.0 milestone Nov 27, 2026
@jbonofre
jbonofre merged commit e8d5272 into apache:main Nov 30, 2026
22 checks passed
@jbonofre
jbonofre deleted the GH-1528-endpoint-location-schemes branch November 30, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java][FlightSQL][JDBC] Endpoint location schemes are compared case-sensitively, and a location without a scheme fails the query

2 participants