Skip to content

feat: added a check for gc code to run #3419

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

JustinRush80
Copy link
Contributor

Description

Add a validation check that only runs if generated columns feature is enabled in the tablefeatures or writer version 5 is enabled

Related Issue(s)

Documentation

Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
@github-actions github-actions bot added the binding/rust Issues for the Rust crate label May 7, 2025
Copy link

github-actions bot commented May 7, 2025

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.

@JustinRush80 JustinRush80 changed the title Added a check for GC code to run feat: added a check for gc code to run May 7, 2025
Copy link
Collaborator

@ion-elgreco ion-elgreco left a comment

Choose a reason for hiding this comment

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

Just two nits, otherwise we are good to go! :)

Thanks for picking this up

Comment on lines 454 to 458
let generated_col_expressions = this
.snapshot
.as_ref()
.map(|v| v.schema().get_generated_columns().unwrap_or_default())
.unwrap_or_default();
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can do snapshot.schema() now since you already checked existence :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh thank you for the catch!

let (source, missing_generated_columns) =
add_missing_generated_columns(source.clone(), &generated_col_expressions)?;

source_with_gc = Some(source);
Copy link
Collaborator

Choose a reason for hiding this comment

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

small nit, but we can do same as you did in the write mod, just use a mut source

Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
Signed-off-by: JustinRush80 <[email protected]>
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.

Generated columns feature needs to be checked
2 participants