()
| 206 | |
| 207 | @pytest.mark.pandas |
| 208 | def test_empty_table_roundtrip(): |
| 209 | df = alltypes_sample(size=10) |
| 210 | |
| 211 | # Create a non-empty table to infer the types correctly, then slice to 0 |
| 212 | table = pa.Table.from_pandas(df) |
| 213 | table = pa.Table.from_arrays( |
| 214 | [col.chunk(0)[:0] for col in table.itercolumns()], |
| 215 | names=table.schema.names) |
| 216 | |
| 217 | assert table.schema.field('null').type == pa.null() |
| 218 | assert table.schema.field('null_list').type == pa.list_(pa.null()) |
| 219 | _check_roundtrip( |
| 220 | table, version='2.6') |
| 221 | |
| 222 | |
| 223 | @pytest.mark.pandas |
nothing calls this directly
no test coverage detected