-
Notifications
You must be signed in to change notification settings - Fork 525
feat: add a table description and name to the Delta Table from Python #3464
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 a table description and name to the Delta Table from Python #3464
Conversation
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. |
41dfdb1
to
cb25b37
Compare
f241c2f
to
ad5d359
Compare
👋 @fvaleye! This looks useful for sure, but I think it makes more sense to have a new operation that updates a subset of the table_metadata and maybe takes an Enum::TableName/TableDescription as input instead of going through the set_table_properties |
I hesitated whether to reuse this method or create a new one: |
a167684
to
72452d6
Compare
2fb1690
to
6026ca3
Compare
@fvaleye Maybe we can use https://github.com/Keats/validator to validate the enum properties directly? Then you don't have to check downstream again in case users directly construct the enum |
93d3298
to
b55ec4e
Compare
Thanks for the idea, loved it. |
Add convenient methods to set table description and name through the Python API. Signed-off-by: Florian VALEYE <[email protected]>
b55ec4e
to
fb1b086
Compare
Yes, let's see what others have to say, @roeap, @rtyler any thoughts on this? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3464 +/- ##
========================================
Coverage 71.22% 71.22%
========================================
Files 148 149 +1
Lines 44707 44836 +129
Branches 44707 44836 +129
========================================
+ Hits 31843 31935 +92
- Misses 10794 10831 +37
Partials 2070 2070 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There is also https://docs.rs/garde/latest/garde/ btw, which is a drop-in replacement/rewrite of validator, has some more functions. Both seem well maintained in terms of updates |
generally speaking I am a great fan of validating data and failing early if we encounter invalid data. I have experience with neither crate, but it seems |
Let's add |
266a210
to
a5cec3c
Compare
…ation in Rust Signed-off-by: Florian VALEYE <[email protected]>
a5cec3c
to
710fe74
Compare
I added the |
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.
Great stuff!
FYI: I didn't add more Python tests in lib.rs because it is already tested (not covered by the coverage tool). |
That's fine, I only test pyo3 code in python :) because that's what matters in the end |
Hey 👋,
Let's start with a simple one.
Description
Adds convenient methods to set the table description and name through the Python API:
table.alter.set_table_description(desc)
method in Pythontable.alter.set_table_name(name)
method in PythonRelated issue
Implementation Details
validator
crateset_table_name
andset_table_description
Use Case
Previously, users had to use
set_table_properties
with specific property keys and faced issues with property validation. Now they can simply call:This resolves the
DeltaError
about property values needing to be in TableProperty enum by directly handling description/name metadata rather than as generic properties.This update fixes the table description setting, which previously required manual property management, and provides a clean, intuitive API for standard table metadata operations.