diff --git a/ballista/rust/core/src/client.rs b/ballista/rust/core/src/client.rs index ccbaea8da96f..54418884d312 100644 --- a/ballista/rust/core/src/client.rs +++ b/ballista/rust/core/src/client.rs @@ -17,7 +17,6 @@ //! Client API for sending requests to executors. -use parking_lot::Mutex; use std::sync::Arc; use std::{ @@ -130,16 +129,13 @@ impl BallistaClient { } struct FlightDataStream { - stream: Mutex>, + stream: Streaming, schema: SchemaRef, } impl FlightDataStream { pub fn new(stream: Streaming, schema: SchemaRef) -> Self { - Self { - stream: Mutex::new(stream), - schema, - } + Self { stream, schema } } } @@ -147,11 +143,10 @@ impl Stream for FlightDataStream { type Item = ArrowResult; fn poll_next( - self: std::pin::Pin<&mut Self>, + mut self: std::pin::Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll> { - let mut stream = self.stream.lock(); - stream.poll_next_unpin(cx).map(|x| match x { + self.stream.poll_next_unpin(cx).map(|x| match x { Some(flight_data_chunk_result) => { let converted_chunk = flight_data_chunk_result .map_err(|e| ArrowError::from_external_error(Box::new(e)))