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

Function test_read_options

python/pyarrow/tests/test_flight.py:1542–1556  ·  view source on GitHub ↗

Make sure ReadOptions can be used.

()

Source from the content-addressed store, hash-verified

1540
1541
1542def test_read_options():
1543 """Make sure ReadOptions can be used."""
1544 expected = pa.Table.from_arrays([pa.array([1, 2, 3, 4])], names=["b"])
1545 with ConstantFlightServer() as server, \
1546 FlightClient(('localhost', server.port)) as client:
1547 options = flight.FlightCallOptions(
1548 read_options=IpcReadOptions(included_fields=[1]))
1549 response1 = client.do_get(flight.Ticket(
1550 b'multi'), options=options).read_all()
1551 response2 = client.do_get(flight.Ticket(b'multi')).read_all()
1552
1553 assert response2.num_columns == 2
1554 assert response1.num_columns == 1
1555 assert response1 == expected
1556 assert response2 == multiple_column_table()
1557
1558
1559basic_auth_handler = HttpBasicServerAuthHandler(creds={

Callers

nothing calls this directly

Calls 7

FlightClientClass · 0.90
IpcReadOptionsClass · 0.85
multiple_column_tableFunction · 0.85
FlightCallOptionsMethod · 0.80
arrayMethod · 0.45
do_getMethod · 0.45

Tested by

no test coverage detected