You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python] Dataset PartitioningFactory cannot be serialized in Python #34884
Describe the bug, including details regarding any error messages, version, and platform.
I would like to be able to serialize a dictionary of pyarrow.dataset.dataset key-word arguments (for parallel processing in Dask). However, it is not possible to do this when one of those arguments contains a Partitioning/PartitioningFactory object, because those objects cannot be serialized in Python.
changed the title [-]Dataset PartitioningFactory cannot be serialized in Python[/-][+][Python ]Dataset PartitioningFactory cannot be serialized in Python[/+]on Apr 4, 2023
changed the title [-][Python ]Dataset PartitioningFactory cannot be serialized in Python[/-][+][Python] Dataset PartitioningFactory cannot be serialized in Python[/+]on Apr 4, 2023
All the partitioning objects we have today can boil down to a schema (which can be saved as an empty parquet/arrow file) and a string denoting the type (e.g. "dictionary" or "hive" or "filename"). I'm not sure if this is helpful or not since I suspect the goal is automatic serialization.
Thanks @westonpace ! The current workaround in Dask is indeed to allow the user to specify a dictionary like {"flavor": "hive", "schema": ...}. This works fine, but the Dask UX would certainly be cleaner if the user could pass in something like an initialized HivePartitioning object.
Activity
[-]Dataset PartitioningFactory cannot be serialized in Python[/-][+][Python ]Dataset PartitioningFactory cannot be serialized in Python[/+][-][Python ]Dataset PartitioningFactory cannot be serialized in Python[/-][+][Python] Dataset PartitioningFactory cannot be serialized in Python[/+]westonpace commentedon Apr 10, 2023
All the partitioning objects we have today can boil down to a schema (which can be saved as an empty parquet/arrow file) and a string denoting the type (e.g. "dictionary" or "hive" or "filename"). I'm not sure if this is helpful or not since I suspect the goal is automatic serialization.
rjzamora commentedon Apr 10, 2023
Thanks @westonpace ! The current workaround in Dask is indeed to allow the user to specify a dictionary like
{"flavor": "hive", "schema": ...}. This works fine, but the Dask UX would certainly be cleaner if the user could pass in something like an initializedHivePartitioningobject.apacheGH-34884: [Python]: Support pickling pyarrow.dataset Partitioni…
GH-34884: [Python]: Support pickling pyarrow.dataset Partitioning sub…
apacheGH-34884: [Python]: Support pickling pyarrow.dataset Partitioni…
GH-34884: [Python]: Support pickling pyarrow.dataset PartitioningFact…
rjzamora commentedon Jul 10, 2023
Thanks @jorisvandenbossche !