You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However it only passes the ticket to DoGet, but ignores the location field of the respective endpoint.
To Reproduce
I'm not aware of system that uses different locations for GetFlightInfo and DoGet, but technically we're violating the protocol here. You could create a test server that runs on two ports and serves all but DoGet on one port and DoGet on the other, refusing the wrong method on the wrong port via an HTTP error.
Expected behavior
Use (or at least double-check) the location for the provided endpoints.
Additional context
We could fix that within the CLI code by potentially creating a new FlightSqlServiceClient if the location changed, however I think the FlightSqlServiceClient::do_get and FlightClient::do_get interface are somewhat misleading, because they suggest that you should use the same tonic::transport::Channel (and hence the same URI) for GetFlightInfo and DoGet -- which is not necessarily true. So while the bug manifests in the CLI, I think this is a Rust API bug.
The text was updated successfully, but these errors were encountered:
Describe the bug
The FlightSQL CLI iterates over the endpoints in
FlightInfo
:arrow-rs/arrow-flight/src/bin/flight_sql_client.rs
Lines 272 to 302 in 3293a8c
However it only passes the ticket to
DoGet
, but ignores thelocation
field of the respective endpoint.To Reproduce
I'm not aware of system that uses different locations for
GetFlightInfo
andDoGet
, but technically we're violating the protocol here. You could create a test server that runs on two ports and serves all butDoGet
on one port andDoGet
on the other, refusing the wrong method on the wrong port via an HTTP error.Expected behavior
Use (or at least double-check) the location for the provided endpoints.
Additional context
We could fix that within the CLI code by potentially creating a new
FlightSqlServiceClient
if the location changed, however I think theFlightSqlServiceClient::do_get
andFlightClient::do_get
interface are somewhat misleading, because they suggest that you should use the sametonic::transport::Channel
(and hence the same URI) forGetFlightInfo
andDoGet
-- which is not necessarily true. So while the bug manifests in the CLI, I think this is a Rust API bug.The text was updated successfully, but these errors were encountered: