-
Notifications
You must be signed in to change notification settings - Fork 81
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
base: main
Are you sure you want to change the base?
Conversation
1a56e00
to
939af20
Compare
…_uri and Snapshot::transaction
939af20
to
2494b63
Compare
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
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.
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)?; |
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.
Aside: a quick skim of the code suggests we have no consistency about whether engine is first arg or not. Should we care?
let table = Table::try_from_uri(path)?; | ||
Ok(table.location().clone()) |
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.
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()); |
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.
intentional addition?
//! The entry-points for this API are: | ||
//! 1. [`Snapshot::checkpoint`] | ||
//! 2. [`Table::checkpoint`] | ||
//! The entrypoint for this API is [`Snapshot::checkpoint`]. |
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.
//! The entrypoint for this API is [`Snapshot::checkpoint`]. | |
//! The entry point for this API is [`Snapshot::checkpoint`]. |
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 PRTable
APIs (Table struct, methods, etc.)delta_kernel::try_parse_uri(&str) -> Url
)Snapshot::try_from_uri
andSnapshot::transaction
How was this change tested?
existing tests modified to use new APIs