Python -> Rust -> Python
()
| 380 | |
| 381 | |
| 382 | def 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 | |
| 398 | def test_fixed_len_list_array(): |
| 399 | """ |