delta-io / delta-rs

A native Rust library for Delta Lake, with bindings into Python
https://delta-io.github.io/delta-rs/
Apache License 2.0
1.98k stars 365 forks source link

fix: add raise_if_key_not_exists to CreateBuilder #2565

Closed vegarsti closed 3 weeks ago

vegarsti commented 4 weeks ago

This PR adds a raise_if_key_not_exists flag to the CreateBuilder which we propagate (currently always true), such that users can choose not to fail if the configuration contains a key that is not a valid DeltaConfigKey. Also expose this in the Python binding.

Closes #2564.

@ion-elgreco

github-actions[bot] commented 4 weeks ago

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.

ion-elgreco commented 4 weeks ago

Can you expose this to python as well

vegarsti commented 4 weeks ago

Yeah! The approach is ok?

ion-elgreco commented 4 weeks ago

Yeah! The approach is ok?

Yess, if you can also add one test to check if non delta keys are getting passed through and so forth.

vegarsti commented 3 weeks ago

Would you mind pointing me to the relevant Python file? 😄 Is it deltalake/table.py?

ion-elgreco commented 3 weeks ago

Would you mind pointing me to the relevant Python file? 😄 Is it deltalake/table.py?

Yes there! And python/src/lib.rs

vegarsti commented 3 weeks ago

Thanks! Added now, let me know if it doesn't make sense. Will add the test you mentioned as well.

vegarsti commented 3 weeks ago

BTW the order in the create classmethod and and create_deltalake aren't exactly the same (before the change in this PR)

vegarsti commented 3 weeks ago

Added test to the Rust code now

vegarsti commented 3 weeks ago

Should I squash the Rust and Python commits?

ion-elgreco commented 3 weeks ago

Should I squash the Rust and Python commits?

No worries, I'll do that with the merge commit

vegarsti commented 3 weeks ago

Thanks for helping so quickly!