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

Function test_fragments_implicit_cast

python/pyarrow/tests/test_dataset.py:1436–1445  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

1434@pytest.mark.pandas
1435@pytest.mark.parquet
1436def test_fragments_implicit_cast(tempdir):
1437 # ARROW-8693
1438 table = pa.table([range(8), [1] * 4 + [2] * 4], names=['col', 'part'])
1439 path = str(tempdir / "test_parquet_dataset")
1440 pq.write_to_dataset(table, path, partition_cols=["part"])
1441
1442 part = ds.partitioning(pa.schema([('part', 'int8')]), flavor="hive")
1443 dataset = ds.dataset(path, format="parquet", partitioning=part)
1444 fragments = dataset.get_fragments(filter=ds.field("part") >= 2)
1445 assert len(list(fragments)) == 1
1446
1447
1448@pytest.mark.parquet

Callers

nothing calls this directly

Calls 5

lenFunction · 0.85
listFunction · 0.85
partitioningMethod · 0.80
schemaMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected