-
Notifications
You must be signed in to change notification settings - Fork 413
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
feat: add restore command in python binding #1529
Conversation
python/src/lib.rs
Outdated
if let Some(version) = version_to_restore { | ||
cmd = cmd.with_version_to_restore(version) | ||
} | ||
if let Some(ds) = datetime_to_restore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since both of these parameters are optional there is a potential for a user to inadvertently provide both arguments and that would result in two restore "commands" being passed into the builder, and the datetime
one is the one which will win in that case.
I think it might be useful to raise an error here to indicate to the user that they should not provide both parameters, or issue a warning that the version_to_restore
will be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check has been done here.parameter check. Should I do double check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the check is good. But TBH, for the Python interface, I think we should combine the parameters into one. See my other comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the high-quality tests. I think there's some UX stuff on the Python API that could be improved, then I think this is ready to be merged.
python/src/lib.rs
Outdated
if let Some(version) = version_to_restore { | ||
cmd = cmd.with_version_to_restore(version) | ||
} | ||
if let Some(ds) = datetime_to_restore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the check is good. But TBH, for the Python interface, I think we should combine the parameters into one. See my other comment.
# Description This is a implementation of the Restore Command for python binding. # Related Issue(s) delta-io#837 --------- Co-authored-by: Will Jones <[email protected]>
Description
This is a implementation of the Restore Command for python binding.
Related Issue(s)
#837