Skip to content

fix: make DeltaTable pickleable #3501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

HiromuHota
Copy link
Contributor

Description

This PR adds __reduce__ method to DeltaTable to make an object of this class pickleable.

Related Issue(s)

This will fix dask-contrib/dask-deltatable#87 and potentially other distributed system that have to serialize a DeltaTable object and send it over to workers.

Documentation

N/A

@github-actions github-actions bot added the binding/python Issues for the Python package label May 30, 2025
Copy link

ACTION NEEDED

delta-rs follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@HiromuHota HiromuHota changed the title Hh/pickleable table Make DeltaTable pickleable May 30, 2025
@HiromuHota HiromuHota changed the title Make DeltaTable pickleable fix: Make DeltaTable pickleable May 30, 2025
@HiromuHota HiromuHota changed the title fix: Make DeltaTable pickleable fix: make DeltaTable pickleable May 30, 2025
@ion-elgreco ion-elgreco self-assigned this May 30, 2025
Copy link

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps using a flag to track if storage options were explicitly passed, and only pickling them if they were would be a more security conscious implementation here?

It avoids credentials being unexpectedly dumped from the environment, but allows credentials to be portable if users pass them explicitly.

@@ -158,6 +158,8 @@ def __init__(

"""
self._storage_options = storage_options

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self._storage_options = storage_options
self._storage_options = storage_options
self._pickle_storage_options = storage_options is not None

@ion-elgreco
Copy link
Collaborator

I suggest you create a wrapper (dask-contrib/dask-deltatable#87 (comment)) after #3518 lands :)

@ion-elgreco ion-elgreco closed this Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/python Issues for the Python package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pickle error when trying to append to existing deltatable
3 participants