Skip to content

Commit e381a72

Browse files
nevi-mebkietz
authored andcommitted
ARROW-8308: [Rust] Implement DoExchange on examples
Closes apache#6800 from nevi-me/ARROW-8308 Authored-by: Neville Dipale <nevilledips@gmail.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
1 parent 2a2a9ae commit e381a72

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

rust/arrow-flight/examples/server.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ impl FlightService for FlightServiceImpl {
4646
>;
4747
type ListActionsStream =
4848
Pin<Box<dyn Stream<Item = Result<ActionType, Status>> + Send + Sync + 'static>>;
49+
type DoExchangeStream =
50+
Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send + Sync + 'static>>;
4951

5052
async fn handshake(
5153
&self,
@@ -102,6 +104,13 @@ impl FlightService for FlightServiceImpl {
102104
) -> Result<Response<Self::ListActionsStream>, Status> {
103105
Err(Status::unimplemented("Not yet implemented"))
104106
}
107+
108+
async fn do_exchange(
109+
&self,
110+
_request: Request<Streaming<FlightData>>,
111+
) -> Result<Response<Self::DoExchangeStream>, Status> {
112+
Err(Status::unimplemented("Not yet implemented"))
113+
}
105114
}
106115

107116
#[tokio::main]

rust/datafusion/examples/flight_server.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ impl FlightService for FlightServiceImpl {
5454
>;
5555
type ListActionsStream =
5656
Pin<Box<dyn Stream<Item = Result<ActionType, Status>> + Send + Sync + 'static>>;
57+
type DoExchangeStream =
58+
Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send + Sync + 'static>>;
5759

5860
async fn get_schema(
5961
&self,
@@ -163,6 +165,13 @@ impl FlightService for FlightServiceImpl {
163165
) -> Result<Response<Self::ListActionsStream>, Status> {
164166
Err(Status::unimplemented("Not yet implemented"))
165167
}
168+
169+
async fn do_exchange(
170+
&self,
171+
_request: Request<Streaming<FlightData>>,
172+
) -> Result<Response<Self::DoExchangeStream>, Status> {
173+
Err(Status::unimplemented("Not yet implemented"))
174+
}
166175
}
167176

168177
fn to_tonic_err(e: &datafusion::error::ExecutionError) -> Status {

0 commit comments

Comments
 (0)