Skip to content

Conversation

zachschuermann
Copy link
Member

@zachschuermann zachschuermann commented Sep 11, 2025

Important

This PR is split into two commits: (1) material changes, and (2) callsite updates

What changes are proposed in this pull request?

This PR integrates Snapshot::try_new_from into SnapshotBuilder. We move Snapshot::try_new_from into Snapshot::builder_from and modify SnapshotBuilder to return an Arc<Snapshot> instead of a Snapshot.

Also, Snapshot::builder(table_root) is renamed to Snapshot::builder_for(table_root)

This PR affects the following public APIs

  1. Replaces Snapshot::try_new_from(existing) with Snapshot::build_from(existing).build()
  2. SnapshotBuilder::build() now returns an Arc<Snapshot> instead of a Snapshot
  3. Renames Snapshot::builder to Snapshot::builder_for

How was this change tested?

refactor, updated tests

Copy link

codecov bot commented Sep 11, 2025

Codecov Report

❌ Patch coverage is 75.42373% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.96%. Comparing base (3292cef) to head (95ba8b9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
kernel/src/snapshot.rs 85.00% 0 Missing and 9 partials ⚠️
kernel/src/checkpoint/tests.rs 40.00% 0 Missing and 6 partials ⚠️
kernel/src/snapshot/builder.rs 80.95% 2 Missing and 2 partials ⚠️
acceptance/src/data.rs 0.00% 0 Missing and 2 partials ⚠️
acceptance/src/meta.rs 0.00% 0 Missing and 2 partials ⚠️
kernel/src/table_changes/mod.rs 71.42% 0 Missing and 2 partials ⚠️
test-utils/src/lib.rs 0.00% 0 Missing and 2 partials ⚠️
ffi/src/lib.rs 50.00% 0 Missing and 1 partial ⚠️
ffi/src/transaction/mod.rs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1289      +/-   ##
==========================================
- Coverage   83.98%   83.96%   -0.02%     
==========================================
  Files         111      111              
  Lines       26175    26207      +32     
  Branches    26175    26207      +32     
==========================================
+ Hits        21983    22005      +22     
- Misses       3098     3104       +6     
- Partials     1094     1098       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

generally looks good, but will wait for the rename to stamp

@zachschuermann zachschuermann force-pushed the snapshot-builder-try-new-from-retake branch 2 times, most recently from 0d90bec to 621ae16 Compare September 12, 2025 01:58
@zachschuermann zachschuermann force-pushed the snapshot-builder-try-new-from-retake branch from 621ae16 to d98b3e9 Compare September 12, 2025 04:43
Copy link
Collaborator

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

lgtm!

@zachschuermann zachschuermann force-pushed the snapshot-builder-try-new-from-retake branch from d98b3e9 to 713f748 Compare September 15, 2025 20:47
@zachschuermann zachschuermann merged commit 5462ccb into delta-io:main Sep 16, 2025
19 of 21 checks passed
@zachschuermann zachschuermann deleted the snapshot-builder-try-new-from-retake branch September 16, 2025 19:24
murali-db pushed a commit to murali-db/delta-kernel-rs that referenced this pull request Sep 17, 2025
…-io#1289)

> [!IMPORTANT]
> This PR is split into two commits: (1) material changes, and (2)
callsite updates

This PR integrates `Snapshot::try_new_from` into `SnapshotBuilder`. We
move `Snapshot::try_new_from` into `Snapshot::builder_from` and modify
`SnapshotBuilder` to return an `Arc<Snapshot>` instead of a `Snapshot`.

Also, `Snapshot::builder(table_root)` is renamed to
`Snapshot::builder_for(table_root)`

1. Replaces `Snapshot::try_new_from(existing)` with
`Snapshot::build_from(existing).build()`
2. `SnapshotBuilder::build()` now returns an `Arc<Snapshot>` instead of
a `Snapshot`
3. Renames `Snapshot::builder` to `Snapshot::builder_for`

refactor, updated tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Change that require a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants