MCPcopy Create free account
hub / github.com/apache/arrow-rs / do_get

Method do_get

arrow-flight/src/sql/client.rs:278–292  ·  view source on GitHub ↗

Given a flight ticket, request to be sent the stream. Returns record batch stream reader

(
        &mut self,
        ticket: impl IntoRequest<Ticket>,
    )

Source from the content-addressed store, hash-verified

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(

Callers 1

execute_flightFunction · 0.45

Calls 5

extract_lazy_trailersFunction · 0.85
set_request_headersMethod · 0.80
with_trailersMethod · 0.80
with_headersMethod · 0.80
into_partsMethod · 0.45

Tested by

no test coverage detected