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

Method do_get

python/pyarrow/tests/test_flight.py:375–386  ·  view source on GitHub ↗
(self, context, ticket)

Source from the content-addressed store, hash-verified

373 schema = pa.schema([('a', pa.int32())])
374
375 def do_get(self, context, ticket):
376 if ticket.ticket == b'yield_data':
377 # Check that the server handler will ignore empty tables
378 # up to a certain extent
379 data = [
380 self.schema.empty_table(),
381 self.schema.empty_table(),
382 pa.RecordBatch.from_arrays([range(5)], schema=self.schema),
383 ]
384 return flight.GeneratorStream(self.schema, data)
385 return flight.GeneratorStream(
386 self.schema, itertools.repeat(self.schema.empty_table()))
387
388
389class SlowFlightServer(FlightServerBase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected