From 52657a6d3130af4cd98792bad06df0cb782c18db Mon Sep 17 00:00:00 2001 From: Costi Ciudatu Date: Thu, 15 Aug 2024 01:12:17 +0300 Subject: [PATCH 1/2] Make the bearer token visible in FlightSqlServiceClient --- arrow-flight/src/sql/client.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arrow-flight/src/sql/client.rs b/arrow-flight/src/sql/client.rs index 91790898b1cb..7662e04ddf62 100644 --- a/arrow-flight/src/sql/client.rs +++ b/arrow-flight/src/sql/client.rs @@ -110,6 +110,11 @@ impl FlightSqlServiceClient { self.token = None; } + /// Share the bearer token with potentially different `DoGet` clients + pub fn token(&self) -> &Option { + &self.token + } + /// Set header value. pub fn set_header(&mut self, key: impl Into, value: impl Into) { let key: String = key.into(); From d5eca156343b239ce03d0365a90a7680c763e9c0 Mon Sep 17 00:00:00 2001 From: Costi Ciudatu Date: Fri, 16 Aug 2024 10:30:04 +0300 Subject: [PATCH 2/2] Update client.rs Co-authored-by: Andrew Lamb --- arrow-flight/src/sql/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arrow-flight/src/sql/client.rs b/arrow-flight/src/sql/client.rs index 7662e04ddf62..34992a949b9e 100644 --- a/arrow-flight/src/sql/client.rs +++ b/arrow-flight/src/sql/client.rs @@ -111,8 +111,8 @@ impl FlightSqlServiceClient { } /// Share the bearer token with potentially different `DoGet` clients - pub fn token(&self) -> &Option { - &self.token + pub fn token(&self) -> Option<&String> { + self.token.as_ref() } /// Set header value.