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

Function test_partition_keys

python/pyarrow/tests/test_dataset.py:936–947  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

934
935
936def test_partition_keys():
937 a, b, c = [ds.field(f) == f for f in 'abc']
938 assert ds.get_partition_keys(a) == {'a': 'a'}
939 assert ds.get_partition_keys(a) == ds._get_partition_keys(a)
940 assert ds.get_partition_keys(a & b & c) == {f: f for f in 'abc'}
941
942 nope = ds.field('d') >= 3
943 assert ds.get_partition_keys(nope) == {}
944 assert ds.get_partition_keys(a & nope) == {'a': 'a'}
945
946 null = ds.field('a').is_null()
947 assert ds.get_partition_keys(null) == {'a': None}
948
949
950@pytest.mark.parquet

Callers

nothing calls this directly

Calls 2

is_nullMethod · 0.80
fieldMethod · 0.45

Tested by

no test coverage detected