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

Method do_exchange

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

Source from the content-addressed store, hash-verified

2749
2750 class DeltaFlightServer(ConstantFlightServer):
2751 def do_exchange(self, context, descriptor, reader, writer):
2752 expected_table = simple_dicts_table()
2753 received_table = reader.read_all()
2754 assert received_table.equals(expected_table)
2755 assert reader.stats == expected_stats[descriptor.command.decode()]
2756 if descriptor.command == b'dict_deltas':
2757 options = pa.ipc.IpcWriteOptions(emit_dictionary_deltas=True)
2758 writer.begin(expected_table.schema, options=options)
2759 writer.write_table(expected_table)
2760 if descriptor.command == b'dict_replacement':
2761 writer.begin(expected_table.schema)
2762 writer.write_table(expected_table)
2763
2764 with DeltaFlightServer() as server, \
2765 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