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

fix: updating schema/field metadata now retains fragments #3384

Merged
merged 7 commits into from
Jan 15, 2025

Conversation

albertlockett
Copy link
Contributor

fixes: #3383

@github-actions github-actions bot added the bug Something isn't working label Jan 14, 2025
Comment on lines 747 to 749
Operation::UpdateConfig { .. } => {
final_fragments.extend(maybe_existing_fragments?.clone());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should combine this with the Operation::ReserveFragments() branch since they are both metadata-only updates. That way we can keep the logic up-to-date more easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call, made this change

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.55%. Comparing base (b572905) to head (90011e9).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3384      +/-   ##
==========================================
+ Coverage   78.49%   78.55%   +0.05%     
==========================================
  Files         250      250              
  Lines       90243    90379     +136     
  Branches    90243    90379     +136     
==========================================
+ Hits        70833    70993     +160     
+ Misses      16505    16477      -28     
- Partials     2905     2909       +4     
Flag Coverage Δ
unittests 78.55% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

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

Looks good. Had some minor suggestions for the tests

rust/lance/src/dataset.rs Outdated Show resolved Hide resolved
rust/lance/src/dataset.rs Outdated Show resolved Hide resolved
rust/lance/src/dataset.rs Outdated Show resolved Hide resolved
rust/lance/src/dataset.rs Outdated Show resolved Hide resolved
Comment on lines +3624 to +3625
dataset
.replace_field_metadata(vec![(0, new_field_meta.clone())])
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't actually realize we re-used UpdateConfig for schema metadata updates. I thought we just used it for the dataset config.

@albertlockett albertlockett merged commit 9f7e012 into main Jan 15, 2025
28 of 30 checks passed
@albertlockett albertlockett deleted the albert/3383 branch January 15, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

updating schema/field metadata removes fragments from the manifest
3 participants