unikdahal opened a new pull request, #4539:
URL: https://github.com/apache/arrow-adbc/pull/4539

     ## What's Changed                                                          
                                                                                
     
                                                                                
                                                                                
     
     Adds support for `flightsql://` URIs to the Java Flight SQL driver, 
mirroring the Go driver's implementation (#4488).                               
            
                                                                                
                                                                                
     
     - `flightsql://<host>:<port>` — secure TLS by default                      
                                                                                
     
     - `flightsql://<host>:<port>?transport=tls` — explicit TLS                 
                                                                                
     
     - `flightsql://<host>:<port>?transport=tcp` — plaintext gRPC               
                                                                                
     
     - `flightsql:///<path/to/socket>?transport=unix` — Unix domain socket      
                                                                                
     
                                                                                
                                                                                
     
     The `transport` value is matched case-insensitively; an unrecognized value 
is rejected with `INVALID_ARGUMENT` rather than silently falling back. Invalid  
     
     combinations (socket path with `tcp`/`tls`, host with `unix`, missing 
host/path) are rejected, matching the Go driver's validation and error 
messages. The      
     legacy `grpc://`, `grpc+tcp://`, `grpc+tls://`, and `grpc+unix://` schemes 
are still accepted unchanged.                                                   
     
                                                                                
                                                                                
     
     URIs with userinfo or a fragment are rejected explicitly, since `Location` 
would otherwise drop them silently. Parse failures that `java.net.URI` reports 
only  
     via `Location`'s `IllegalArgumentException` (e.g. hostnames that fail 
strict authority parsing) are caught and surfaced as `INVALID_ARGUMENT` 
`AdbcException`s. 
                                                                                
                                                                                
     
     `FlightSqlDatabase#toString` now reports the originally configured URI 
alongside the resolved target.                                                  
         
                                                                                
                                                                                
     
     ## Testing                                                                 
                                                                                
     
                                                                                
                                                                                
     
     - New `FlightSqlDriverUriTest`: 18 unit tests covering translation of all 
transports, case-insensitivity, legacy scheme passthrough, a real connection 
over     
     `?transport=tcp` against an in-process Flight server, and rejection cases 
(unrecognized transport, invalid host/path combinations, userinfo, fragment, 
malformed
     percent-encoding, unparseable hosts).                                      
                                                                                
     
     - Two TLS tests added to `TlsTest` exercising `flightsql://` default and 
explicit `?transport=tls` against the TLS test server.                          
       
                                                                                
                                                                                
     
     Closes #4516. Part of #4453.


-- 
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]

Reply via email to