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

Function test_read_options

python/pyarrow/tests/test_flight.py:1580–1594  ·  view source on GitHub ↗

Make sure ReadOptions can be used.

()

Source from the content-addressed store, hash-verified

1578
1579
1580def test_read_options():
1581 """Make sure ReadOptions can be used."""
1582 expected = pa.Table.from_arrays([pa.array([1, 2, 3, 4])], names=["b"])
1583 with ConstantFlightServer() as server, \
1584 FlightClient(('localhost', server.port)) as client:
1585 options = flight.FlightCallOptions(
1586 read_options=IpcReadOptions(included_fields=[1]))
1587 response1 = client.do_get(flight.Ticket(
1588 b'multi'), options=options).read_all()
1589 response2 = client.do_get(flight.Ticket(b'multi')).read_all()
1590
1591 assert response2.num_columns == 2
1592 assert response1.num_columns == 1
1593 assert response1 == expected
1594 assert response2 == multiple_column_table()
1595
1596
1597basic_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