apache / apache/arrow-rs

Add `new_from_inner()` to `FlightSqlServiceClient`

Open
#5,394 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
3.6k
Forks
1.3k
Avg merge
2d 14h
Merged PRs (30d)
167

Description

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**

Since `FlightSqlServiceClient` does not provide a constructor function with a `FlightServiceClient`, I cannot configure the `FlightServiceClient`, such as setting `max_decoding_message_size`. Providing `inner_mut()` is not enough, since `FlightServiceClient` only supports configuration through the builder functions. Consequently, I cannot use `FlightSqlServiceClient`.

**Describe the solution you'd like**

Add a constructor function `new_from_inner()` like this:

```rust
pub fn new_from_inner(flight_client: FlightServiceClient) -> Self {
Self {
token: None,
headers: HashMap::default(),
flight_client
}
}
```

**Describe alternatives you've considered**

None.

**Additional context**

None.

Contributor guide

Open the contributing guide

Research direction

Start at the FlightSqlServiceClient implementation and inspect how its FlightServiceClient is currently constructed. Add the requested new_from_inner() entry point and verify that the project builds and the client behavior remains covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.