MCPcopy Create free account
hub / github.com/apache/arrow / _create_dataset_for_fragments

Function _create_dataset_for_fragments

python/pyarrow/tests/test_dataset.py:1384–1398  ·  view source on GitHub ↗
(tempdir, chunk_size=None, filesystem=None)

Source from the content-addressed store, hash-verified

1382
1383@pytest.mark.parquet
1384def _create_dataset_for_fragments(tempdir, chunk_size=None, filesystem=None):
1385 table = pa.table(
1386 [range(8), [1] * 8, ['a'] * 4 + ['b'] * 4],
1387 names=['f1', 'f2', 'part']
1388 )
1389
1390 path = str(tempdir / "test_parquet_dataset")
1391
1392 pq.write_to_dataset(table, path,
1393 partition_cols=["part"], chunk_size=chunk_size)
1394 dataset = ds.dataset(
1395 path, format="parquet", partitioning="hive", filesystem=filesystem
1396 )
1397
1398 return table, dataset
1399
1400
1401@pytest.mark.parquet

Calls

no outgoing calls

Tested by

no test coverage detected