Given a flight ticket, request to be sent the stream. Returns record batch stream reader
(
&mut self,
ticket: impl IntoRequest<Ticket>,
)
| 276 | |
| 277 | /// Given a flight ticket, request to be sent the stream. Returns record batch stream reader |
| 278 | pub async fn do_get( |
| 279 | &mut self, |
| 280 | ticket: impl IntoRequest<Ticket>, |
| 281 | ) -> Result<FlightRecordBatchStream> { |
| 282 | let req = self.set_request_headers(ticket.into_request())?; |
| 283 | |
| 284 | let (md, response_stream, _ext) = self.flight_client.do_get(req).await?.into_parts(); |
| 285 | let (response_stream, trailers) = extract_lazy_trailers(response_stream); |
| 286 | |
| 287 | Ok(FlightRecordBatchStream::new_from_flight_data( |
| 288 | response_stream.map_err(|status| status.into()), |
| 289 | ) |
| 290 | .with_headers(md) |
| 291 | .with_trailers(trailers)) |
| 292 | } |
| 293 | |
| 294 | /// Push a stream to the flight service associated with a particular flight stream. |
| 295 | pub async fn do_put( |
no test coverage detected