()
| 1603 | |
| 1604 | |
| 1605 | def test_drop_null_table(): |
| 1606 | table = pa.table([pa.array(["a", None, "c", "d", None])], names=["a"]) |
| 1607 | expected = pa.table([pa.array(["a", "c", "d"])], names=["a"]) |
| 1608 | result = table.drop_null() |
| 1609 | assert result.equals(expected) |
| 1610 | |
| 1611 | table = pa.table([pa.chunked_array([["a", None], ["c", "d", None]]), |
| 1612 | pa.chunked_array([["a", None], [None, "d", None]]), |
| 1613 | pa.chunked_array([["a"], ["b"], [None], ["d", None]])], |
| 1614 | names=["a", "b", "c"]) |
| 1615 | expected = pa.table([pa.array(["a", "d"]), |
| 1616 | pa.array(["a", "d"]), |
| 1617 | pa.array(["a", "d"])], |
| 1618 | names=["a", "b", "c"]) |
| 1619 | result = table.drop_null() |
| 1620 | assert result.equals(expected) |
| 1621 | |
| 1622 | table = pa.table([pa.chunked_array([["a", "b"], ["c", "d", "e"]]), |
| 1623 | pa.chunked_array([["A"], ["B"], [None], ["D", None]]), |
| 1624 | pa.chunked_array([["a`", None], ["c`", "d`", None]])], |
| 1625 | names=["a", "b", "c"]) |
| 1626 | expected = pa.table([pa.array(["a", "d"]), |
| 1627 | pa.array(["A", "D"]), |
| 1628 | pa.array(["a`", "d`"])], |
| 1629 | names=["a", "b", "c"]) |
| 1630 | result = table.drop_null() |
| 1631 | assert result.equals(expected) |
| 1632 | |
| 1633 | |
| 1634 | def test_drop_null_null_type(): |
nothing calls this directly
no test coverage detected