MCPcopy Create free account
hub / github.com/apache/arrow-rs / test_map_array

Function test_map_array

arrow-pyarrow-integration-testing/tests/test_sql.py:382–396  ·  view source on GitHub ↗

Python -> Rust -> Python

()

Source from the content-addressed store, hash-verified

380
381
382def test_map_array():
383 """
384 Python -> Rust -> Python
385 """
386 data = [
387 [{'key': "a", 'value': 1}, {'key': "b", 'value': 2}],
388 [{'key': "c", 'value': 3}, {'key': "d", 'value': 4}]
389 ]
390 a = pa.array(data, pa.map_(pa.string(), pa.int32()))
391 b = rust.round_trip_array(a)
392 b.validate(full=True)
393 assert a.to_pylist() == b.to_pylist()
394 assert a.type == b.type
395 del a
396 del b
397
398def test_fixed_len_list_array():
399 """

Callers

nothing calls this directly

Calls 3

arrayMethod · 0.80
stringMethod · 0.80
validateMethod · 0.45

Tested by

no test coverage detected