apache / arrow-rs

Official Rust implementation of Apache Arrow
https://arrow.apache.org/
Apache License 2.0
2.47k stars 739 forks source link

Make the bearer token visible in FlightSqlServiceClient #6253

Closed ccciudatu closed 1 month ago

ccciudatu commented 1 month ago

FlightSqlServiceClient stores the bearer token it receives on the Handshake response and uses it on all subsequent requests. The Flight protocol does not clearly specify whether the bearer token has to be sent on DoGet calls as well (along with the ticket). Because of this, several Flight SQL server implementors decided to expect the bearer token on DoGet requests. However, if the DoGet call needs to go to a different endpoint, or when the client decides to parallelise the streams and have the DoGet calls performed by different threads (or even nodes), the new client instances cannot access the bearer token simply because the field is private and only writable (set and clear).

Adding a "getter" would solve this problem and allow the client app to propagate the token to distributed DoGet calls.

alamb commented 3 weeks ago

label_issue.py automatically added labels {'arrow'} from #6254

alamb commented 3 weeks ago

label_issue.py automatically added labels {'arrow-flight'} from #6254