()
| 481 | |
| 482 | |
| 483 | def test_chunked_array_unify_dictionaries(): |
| 484 | arr = pa.chunked_array([ |
| 485 | pa.array(["foo", "bar", None, "foo"]).dictionary_encode(), |
| 486 | pa.array(["quux", None, "foo"]).dictionary_encode(), |
| 487 | ]) |
| 488 | assert arr.chunk(0).dictionary.equals(pa.array(["foo", "bar"])) |
| 489 | assert arr.chunk(1).dictionary.equals(pa.array(["quux", "foo"])) |
| 490 | arr = arr.unify_dictionaries() |
| 491 | expected_dict = pa.array(["foo", "bar", "quux"]) |
| 492 | assert arr.chunk(0).dictionary.equals(expected_dict) |
| 493 | assert arr.chunk(1).dictionary.equals(expected_dict) |
| 494 | assert arr.to_pylist() == ["foo", "bar", None, "foo", "quux", None, "foo"] |
| 495 | |
| 496 | |
| 497 | def test_recordbatch_dunder_init(): |
nothing calls this directly
no test coverage detected