Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/iceberg/public-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ pub type iceberg::expr::Term = iceberg::expr::Reference
pub mod iceberg::inspect
pub enum iceberg::inspect::MetadataTableType
pub iceberg::inspect::MetadataTableType::Manifests
pub iceberg::inspect::MetadataTableType::Refs
pub iceberg::inspect::MetadataTableType::Snapshots
impl iceberg::inspect::MetadataTableType
pub fn iceberg::inspect::MetadataTableType::all_types() -> impl core::iter::traits::iterator::Iterator<Item = Self>
Expand All @@ -645,6 +646,7 @@ pub struct iceberg::inspect::MetadataTable<'a>(_)
impl<'a> iceberg::inspect::MetadataTable<'a>
pub fn iceberg::inspect::MetadataTable<'a>::manifests(&self) -> iceberg::inspect::ManifestsTable<'_>
pub fn iceberg::inspect::MetadataTable<'a>::new(table: &'a iceberg::table::Table) -> Self
pub fn iceberg::inspect::MetadataTable<'a>::refs(&self) -> iceberg::inspect::RefsTable<'_>
pub fn iceberg::inspect::MetadataTable<'a>::snapshots(&self) -> iceberg::inspect::SnapshotsTable<'_>
impl<'a> core::fmt::Debug for iceberg::inspect::MetadataTable<'a>
pub fn iceberg::inspect::MetadataTable<'a>::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
Expand All @@ -663,6 +665,11 @@ pub fn iceberg::inspect::MetadataTableTypeIter::next(&mut self) -> core::option:
pub fn iceberg::inspect::MetadataTableTypeIter::nth(&mut self, n: usize) -> core::option::Option<<Self as core::iter::traits::iterator::Iterator>::Item>
pub fn iceberg::inspect::MetadataTableTypeIter::size_hint(&self) -> (usize, core::option::Option<usize>)
impl core::iter::traits::marker::FusedIterator for iceberg::inspect::MetadataTableTypeIter
pub struct iceberg::inspect::RefsTable<'a>
impl<'a> iceberg::inspect::RefsTable<'a>
pub fn iceberg::inspect::RefsTable<'a>::new(table: &'a iceberg::table::Table) -> Self
pub async fn iceberg::inspect::RefsTable<'a>::scan(&self) -> iceberg::Result<iceberg::scan::ArrowRecordBatchStream>
pub fn iceberg::inspect::RefsTable<'a>::schema(&self) -> iceberg::spec::Schema
pub struct iceberg::inspect::SnapshotsTable<'a>
impl<'a> iceberg::inspect::SnapshotsTable<'a>
pub fn iceberg::inspect::SnapshotsTable<'a>::new(table: &'a iceberg::table::Table) -> Self
Expand Down
11 changes: 10 additions & 1 deletion crates/iceberg/src/inspect/metadata_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use super::{ManifestsTable, SnapshotsTable};
use super::{ManifestsTable, RefsTable, SnapshotsTable};
use crate::table::Table;

/// Metadata table is used to inspect a table's history, snapshots, and other metadata as a table.
Expand All @@ -34,6 +34,8 @@ pub enum MetadataTableType {
Snapshots,
/// [`ManifestsTable`]
Manifests,
/// [`RefsTable`]
Refs,
}

impl MetadataTableType {
Expand All @@ -42,6 +44,7 @@ impl MetadataTableType {
match self {
MetadataTableType::Snapshots => "snapshots",
MetadataTableType::Manifests => "manifests",
MetadataTableType::Refs => "refs",
}
}

Expand All @@ -59,6 +62,7 @@ impl TryFrom<&str> for MetadataTableType {
match value {
"snapshots" => Ok(Self::Snapshots),
"manifests" => Ok(Self::Manifests),
"refs" => Ok(Self::Refs),
_ => Err(format!("invalid metadata table type: {value}")),
}
}
Expand All @@ -79,4 +83,9 @@ impl<'a> MetadataTable<'a> {
pub fn manifests(&self) -> ManifestsTable<'_> {
ManifestsTable::new(self.0)
}

/// Get the refs table.
pub fn refs(&self) -> RefsTable<'_> {
RefsTable::new(self.0)
}
}
2 changes: 2 additions & 0 deletions crates/iceberg/src/inspect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@

mod manifests;
mod metadata_table;
mod refs;
mod snapshots;

pub use manifests::ManifestsTable;
pub use metadata_table::*;
pub use refs::RefsTable;
pub use snapshots::SnapshotsTable;
Loading
Loading