()
| 223 | |
| 224 | @pytest.mark.pandas |
| 225 | def test_empty_table_roundtrip(): |
| 226 | df = alltypes_sample(size=10) |
| 227 | |
| 228 | # Create a non-empty table to infer the types correctly, then slice to 0 |
| 229 | table = pa.Table.from_pandas(df) |
| 230 | table = pa.Table.from_arrays( |
| 231 | [col.chunk(0)[:0] for col in table.itercolumns()], |
| 232 | names=table.schema.names) |
| 233 | |
| 234 | assert table.schema.field('null').type == pa.null() |
| 235 | assert table.schema.field('null_list').type == pa.list_(pa.null()) |
| 236 | _check_roundtrip( |
| 237 | table, version='2.6') |
| 238 | |
| 239 | |
| 240 | @pytest.mark.pandas |
nothing calls this directly
no test coverage detected