Skip to main content

Crate facett_icebergview

Crate facett_icebergview 

Source
Expand description

facett-icebergview — browse and time-travel one Iceberg table, drawn from Arrow RecordBatches. The component is engine-agnostic: you hand it, per Iceberg snapshot, the snapshot’s metadata + its materialized Arrow frame; it renders a snapshot picker (newest-first, showing snapshot id / timestamp / row-count) over a virtualized, paged row grid (the rows come from facett_table::Table, built from the batch via facett_arrow). Selecting a snapshot loads that snapshot’s frame — time travel.

Like every facett component it implements Facet (title / ui / state_json), so it drops into a FacetDeck and is robot-testable through facett_core::harness: drive IcebergView::select_snapshot / IcebergView::set_page headlessly and assert state_json (the current snapshot, the snapshot list, and the visible rows all change). state_json exposes:

  • table — the table name,
  • snapshots — every snapshot newest-first (id, timestamp_ms, rows),
  • current — the selected snapshot id,
  • total_rows / page / page_size / visible_rows — the paged view.

Why not just facett-table? A table viewer shows one frame. This adds the Iceberg dimension — the history of snapshots and the control to scrub between them — which is the whole point of a lakehouse table browser. The adapter that fills it from a real catalog (skade) lives host-side (korp / nornir) so this crate never takes a hard catalog/engine dependency.

Structs§

IcebergView
A browse + time-travel viewer for one Iceberg table.
Snapshot
One snapshot paired with the Arrow frame that materializes it. The frame is a Vec<RecordBatch> exactly as a scan returns it; IcebergView concatenates the rows into a paged Table for rendering.
SnapshotMeta
One Iceberg snapshot’s identity, for the picker + state_json. Mirrors what iceberg::spec::Snapshot exposes (snapshot_id() / timestamp_ms()) plus a row count the host computes (scan count, or the snapshot summary’s total-records).

Constants§

DEFAULT_PAGE_SIZE
Default rows shown per page (the Table is virtualized, but paging keeps a huge snapshot from being cell-formatted all at once and makes visible_rows meaningful for headless assertions).