Repository navigation
refactor!: move the metadata table read into its data source - #119
Open
NoahKusaba wants to merge 1 commit into
Open
NoahKusaba wants to merge 1 commit into
NoahKusaba wants to merge 1 commit into
Conversation
NoahKusaba
force-pushed
the
refactor/metadata-scan
branch
from
November 19, 2026 12:51
cd3f50f to
dd7dd49
Compare
IcebergMetadataTableProvider::scan(self) shared the name of TableProvider::scan but consumed the provider and returned a stream. Its only caller is IcebergMetadataDataSource::open, so the read is now a private function next to it. Adds a test that reads $history, the one metadata table no test read.
NoahKusaba
force-pushed
the
refactor/metadata-scan
branch
from
November 19, 2026 12:54
dd7dd49 to
f7dfb72
Compare
NoahKusaba
marked this pull request as ready for review
November 19, 2026 12:54
Contributor
Author
|
@gabotechs this one is actually a small easy to read refactor |
alexanderbianchi
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
N/A. Refactor.
Rationale for this change
IcebergMetadataTableProviderhas a public inherentasync fn scan(self)with the same name asTableProvider::scanbut a different meaning: it consumes the provider and returns a stream of batches. Its only caller isIcebergMetadataDataSource::open, so reading rows is the data source's job, not part of the provider's public API.What changes are included in this PR?
IcebergMetadataTableProvider::scan(self).read_allinmetadata/scan.rs, next to its caller.Are there any user-facing changes?
Yes, breaking: the public
IcebergMetadataTableProvider::scan(self)is removed. Metadata tables are still queried through SQL (t$snapshots, ...) orTableProvider::scan, as before.Are these changes tested?
Yes.
$snapshotsand$manifestswere already read in tests; this addsreads_the_history_table, since$historywas only listed, never read. It passes onmaintoo.