Skip to content
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

chore: introduce the Operation trait to enforce consistency between operations #2435

Merged
merged 3 commits into from
Apr 25, 2024

Conversation

rtyler
Copy link
Member

@rtyler rtyler commented Apr 22, 2024

I am spinning this pull request out from some of my other in-flight work to extend behaviors with the operations.

The motivation here is to provide a base trait which can act as a standards-bearer for the operations implementations. Right now this is only enforcing IntoFuture but there are a couple of other changes I am actively working on which I hope will dramatically clean up these operations and enable some of the use-cases that @hntd187 and I have been exploring.

@github-actions github-actions bot added the binding/rust Issues for the Rust crate label Apr 22, 2024
Currently this is nothing but a shim that ensures everything implements
IntoFuture, which they all already do, but in the future this will help
enforce consistency as well as provide common behaviors.
@rtyler rtyler marked this pull request as ready for review April 22, 2024 19:34
@rtyler rtyler enabled auto-merge (rebase) April 22, 2024 19:34
@Blajda
Copy link
Collaborator

Blajda commented Apr 23, 2024

I agree we should start enforcing operations to have a consistent trait interface. For future enhancement on trait method I'd like to see is the ability to obtain the commit data before it's actually committed. This would allow an escape hatch for advanced users to escape our commit process.

@hntd187
Copy link
Collaborator

hntd187 commented Apr 23, 2024

To David's point this is why I think a marker trait by itself it maybe not sufficient, we should eventually move towards a trait that implements and expected life cycle of an operation (or multiple smaller ones that implement a part of it) the most ready example I can think of is something similar to Hadoop's commit protocol, but we should do something that makes sense for us, I'm just using as an example of generalization of such a process.

@rtyler
Copy link
Member Author

rtyler commented Apr 25, 2024

@hntd187 that's certainly the plan here 😄 I just wanted to get something started we could begin hanging functionality off of

@rtyler rtyler merged commit f55ddc6 into delta-io:main Apr 25, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binding/rust Issues for the Rust crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants