feat(inspect): add core metadata tables for inspect module #2089
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.
Summary
Implement 10 new metadata table types for the inspect module, addressing the metadata tables epic #823.
Changes
Add
crates/iceberg/src/inspect/refs.rs:RefsTableshowing all branches and tags with retention policiesTableMetadata.refsHashMapAdd
crates/iceberg/src/inspect/history.rs:HistoryTableshowing snapshot log with ancestry trackingis_current_ancestorby walking parent chain from current snapshotAdd
crates/iceberg/src/inspect/metadata_log_entries.rs:MetadataLogEntriesTableshowing metadata file historyAdd
crates/iceberg/src/inspect/files.rswith shared infrastructure:files_schema()building dynamic schema with partition structscan_files()for current snapshot manifest scanningscan_all_files()for all-snapshot scanning with manifest path deduplicationContentFilterenum for data-only, deletes-only, or all contentFilesTable,DataFilesTable,DeleteFilesTableas thin wrappersAdd
crates/iceberg/src/inspect/all_manifests.rs:AllManifestsTableiterating manifests across all snapshotsreference_snapshot_idfield to track which snapshot references each manifestAdd
crates/iceberg/src/inspect/all_files.rs:AllFilesTable,AllDataFilesTable,AllDeleteFilesTablescan_all_files()with different content filtersUpdate
crates/iceberg/src/inspect/metadata_table.rs:AllManifests,AllFiles,AllDataFiles,AllDeleteFiles,History,MetadataLogEntries,Refs,Files,DataFiles,DeleteFilestoMetadataTableTypeenumMetadataTableUpdate
crates/integrations/datafusion/src/table/metadata_table.rs:MetadataTableTypevariants in schema and scanUpdate
crates/iceberg/src/scan/mod.rs:setup_all_snapshot_manifest_files()test helper for all-snapshot testsNotes
This matches the Java Iceberg implementation's metadata table types:
refs,history,metadata_log_entriesfiles,data_files,delete_filesall_manifests,all_files,all_data_files,all_delete_filesRemaining tables (
all_entries,partitions,position_deletes) are blocked or deferred:all_entriesdepends on ENTRIES PR feat: Support metadata table "Entries" #863partitionsrequires complex aggregation logicposition_deletesrequires reading delete file contents (needs design discussion)Part of #823