You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2026/10/02 15:05:01 UTC

Re: [PR] fix(arrow-flight): send DoGet to the endpoint location in the Flight SQL CLI [arrow-rs]

Jefffrey commented on code in PR #11180:
URL: https://github.com/apache/arrow-rs/pull/11180#discussion_r4166953284


##########
arrow-flight/src/bin/flight_sql_client.rs:
##########
@@ -398,12 +435,73 @@ fn setup_logging(args: LoggingArgs) -> Result<()> {
     Ok(())
 }
 
-async fn setup_client(args: ClientArgs) -> Result<FlightSqlServiceClient<Channel>> {
+/// Prefer a separate location, falling back to the original connection when permitted.
+fn select_endpoint_location<'a>(
+    locations: impl IntoIterator<Item = &'a str>,
+    tls: bool,
+) -> Result<Option<&'a str>> {
+    let mut reuse_connection = false;
+    let mut has_locations = false;
+    for uri in locations {
+        has_locations = true;
+        if uri.is_empty() || uri == REUSE_CONNECTION_URI {
+            reuse_connection = true;
+        } else if !tls || uri.starts_with("https://") {

Review Comment:
   should we be looking at `grpc+tls` too? for reference:
   
   - https://arrow.apache.org/docs/format/Flight.html#location-uris



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org