Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FlightSqlServiceClient::new_from_inner #6003

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions arrow-flight/src/sql/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ pub struct FlightSqlServiceClient<T> {
impl FlightSqlServiceClient<Channel> {
/// Creates a new FlightSql client that connects to a server over an arbitrary tonic `Channel`
pub fn new(channel: Channel) -> Self {
let flight_client = FlightServiceClient::new(channel);
FlightSqlServiceClient {
Self::new_from_inner(FlightServiceClient::new(channel))
}

/// Creates a new higher level client with the provided lower level client
pub fn new_from_inner(inner: FlightServiceClient<Channel>) -> Self {
Self {
token: None,
flight_client,
flight_client: inner,
headers: HashMap::default(),
}
}
Expand Down
Loading