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

Method do_exchange

python/pyarrow/tests/test_flight.py:2789–2800  ·  view source on GitHub ↗
(self, context, descriptor, reader, writer)

Source from the content-addressed store, hash-verified

2787
2788 class DeltaFlightServer(ConstantFlightServer):
2789 def do_exchange(self, context, descriptor, reader, writer):
2790 expected_table = simple_dicts_table()
2791 received_table = reader.read_all()
2792 assert received_table.equals(expected_table)
2793 assert reader.stats == expected_stats[descriptor.command.decode()]
2794 if descriptor.command == b'dict_deltas':
2795 options = pa.ipc.IpcWriteOptions(emit_dictionary_deltas=True)
2796 writer.begin(expected_table.schema, options=options)
2797 writer.write_table(expected_table)
2798 if descriptor.command == b'dict_replacement':
2799 writer.begin(expected_table.schema)
2800 writer.write_table(expected_table)
2801
2802 with DeltaFlightServer() as server, \
2803 FlightClient(('localhost', server.port)) as client:

Callers

nothing calls this directly

Calls 5

simple_dicts_tableFunction · 0.85
equalsMethod · 0.80
decodeMethod · 0.45
beginMethod · 0.45
write_tableMethod · 0.45

Tested by

no test coverage detected