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

Function test_partitioning_pickling

python/pyarrow/tests/test_dataset.py:834–849  ·  view source on GitHub ↗
(pickle_module)

Source from the content-addressed store, hash-verified

832
833
834def test_partitioning_pickling(pickle_module):
835 schema = pa.schema([
836 pa.field('i64', pa.int64()),
837 pa.field('f64', pa.float64())
838 ])
839 parts = [
840 ds.DirectoryPartitioning(schema),
841 ds.HivePartitioning(schema),
842 ds.FilenamePartitioning(schema),
843 ds.DirectoryPartitioning(schema, segment_encoding="none"),
844 ds.FilenamePartitioning(schema, segment_encoding="none"),
845 ds.HivePartitioning(schema, segment_encoding="none", null_fallback="xyz"),
846 ]
847
848 for part in parts:
849 assert pickle_module.loads(pickle_module.dumps(part)) == part
850
851
852@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 6

DirectoryPartitioningMethod · 0.80
FilenamePartitioningMethod · 0.80
loadsMethod · 0.80
dumpsMethod · 0.80
schemaMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected