Skip to content

refactor!: remove Table APIs #976

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zachschuermann
Copy link
Collaborator

What changes are proposed in this pull request?

Prefactor PR for upcoming CatalogManaged/ResolvedTable work. The 'Table' API was just a think shell around a Url - only meaningful work that was done was in the try_from_uri method. All other methods now are just called directly on snapshot. Specifically, this PR

  1. Removes all Table APIs (Table struct, methods, etc.)
  2. put uri parsing into utils (new delta_kernel::try_parse_uri(&str) -> Url)
  3. add Snapshot::try_from_uri and Snapshot::transaction

How was this change tested?

existing tests modified to use new APIs

@github-actions github-actions bot added the breaking-change Change that require a major version bump label May 26, 2025
Copy link

codecov bot commented May 26, 2025

Codecov Report

Attention: Patch coverage is 74.43609% with 34 lines in your changes missing coverage. Please review.

Project coverage is 85.07%. Comparing base (b775963) to head (7240786).

Files with missing lines Patch % Lines
kernel/src/utils.rs 73.07% 16 Missing and 5 partials ⚠️
kernel/src/checkpoint/tests.rs 0.00% 0 Missing and 9 partials ⚠️
acceptance/src/meta.rs 33.33% 0 Missing and 2 partials ⚠️
acceptance/src/data.rs 0.00% 0 Missing and 1 partial ⚠️
kernel/src/snapshot.rs 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #976      +/-   ##
==========================================
- Coverage   85.07%   85.07%   -0.01%     
==========================================
  Files          90       89       -1     
  Lines       23395    23358      -37     
  Branches    23395    23358      -37     
==========================================
- Hits        19904    19871      -33     
+ Misses       2479     2474       -5     
- Partials     1012     1013       +1     

☔ 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

@scovich scovich left a comment

Choose a reason for hiding this comment

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

Overall approach seems fine. I'm a bit curious how this fits into the future work mentioned? Will it go straight to Snapshot?

let (latest, versions) = self.versions().await?;

let snapshot = table.snapshot(engine, None)?;
let snapshot = Snapshot::try_new(self.table_root()?, engine, None)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aside: a quick skim of the code suggests we have no consistency about whether engine is first arg or not. Should we care?

Comment on lines -406 to -407
let table = Table::try_from_uri(path)?;
Ok(table.location().clone())
Copy link
Collaborator

Choose a reason for hiding this comment

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

good riddance...

HashMap::<String, String>::new(),
Arc::new(TokioBackgroundExecutor::new()),
)?;

let snapshot = table.snapshot(&engine, None)?;
let snapshot = Snapshot::try_new(url, &engine, None)?;
println!("Reading {}", snapshot.table_root());
Copy link
Collaborator

Choose a reason for hiding this comment

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

intentional addition?

//! The entry-points for this API are:
//! 1. [`Snapshot::checkpoint`]
//! 2. [`Table::checkpoint`]
//! The entrypoint for this API is [`Snapshot::checkpoint`].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
//! The entrypoint for this API is [`Snapshot::checkpoint`].
//! The entry point for this API is [`Snapshot::checkpoint`].

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.

2 participants