Skip to content

Commit

Permalink
ARROW-8308: [Rust] Implement DoExchange on examples
Browse files Browse the repository at this point in the history
Closes #6800 from nevi-me/ARROW-8308

Authored-by: Neville Dipale <nevilledips@gmail.com>
Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
  • Loading branch information
nevi-me authored and bkietz committed Apr 1, 2020
1 parent 2a2a9ae commit e381a72
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rust/arrow-flight/examples/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ impl FlightService for FlightServiceImpl {
>;
type ListActionsStream =
Pin<Box<dyn Stream<Item = Result<ActionType, Status>> + Send + Sync + 'static>>;
type DoExchangeStream =
Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send + Sync + 'static>>;

async fn handshake(
&self,
Expand Down Expand Up @@ -102,6 +104,13 @@ impl FlightService for FlightServiceImpl {
) -> Result<Response<Self::ListActionsStream>, Status> {
Err(Status::unimplemented("Not yet implemented"))
}

async fn do_exchange(
&self,
_request: Request<Streaming<FlightData>>,
) -> Result<Response<Self::DoExchangeStream>, Status> {
Err(Status::unimplemented("Not yet implemented"))
}
}

#[tokio::main]
Expand Down
9 changes: 9 additions & 0 deletions rust/datafusion/examples/flight_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ impl FlightService for FlightServiceImpl {
>;
type ListActionsStream =
Pin<Box<dyn Stream<Item = Result<ActionType, Status>> + Send + Sync + 'static>>;
type DoExchangeStream =
Pin<Box<dyn Stream<Item = Result<FlightData, Status>> + Send + Sync + 'static>>;

async fn get_schema(
&self,
Expand Down Expand Up @@ -163,6 +165,13 @@ impl FlightService for FlightServiceImpl {
) -> Result<Response<Self::ListActionsStream>, Status> {
Err(Status::unimplemented("Not yet implemented"))
}

async fn do_exchange(
&self,
_request: Request<Streaming<FlightData>>,
) -> Result<Response<Self::DoExchangeStream>, Status> {
Err(Status::unimplemented("Not yet implemented"))
}
}

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

0 comments on commit e381a72

Please sign in to comment.