(basedir)
| 2709 | |
| 2710 | |
| 2711 | def _create_partitioned_dataset(basedir): |
| 2712 | table = pa.table({'a': range(9), 'b': [0.] * 4 + [1.] * 5}) |
| 2713 | |
| 2714 | path = basedir / "dataset-partitioned" |
| 2715 | path.mkdir() |
| 2716 | |
| 2717 | for i in range(3): |
| 2718 | part = path / f"part={i}" |
| 2719 | part.mkdir() |
| 2720 | pq.write_table(table.slice(3*i, 3), part / "test.parquet") |
| 2721 | |
| 2722 | full_table = table.append_column( |
| 2723 | "part", pa.array([0] * 3 + [1] * 3 + [2] * 3, type=pa.int32())) |
| 2724 | |
| 2725 | return full_table, path |
| 2726 | |
| 2727 | |
| 2728 | @pytest.mark.parquet |
no test coverage detected