You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resolve the scan's snapshot once when building IcebergDataSource #118
IcebergDataSource stores snapshot_id: Option<i64>, and each consumer resolves it against the table metadata again:
IcebergStaticTableProvider::try_new_from_table_snapshot looks up the snapshot, returns an error if it's missing, and then keeps only the id (static_table_provider.rs).
get_batch_stream passes the id to iceberg's TableScanBuilder, which looks it up again at execution and fails there if it's missing (scan.rs, iceberg-rust TableScanBuilder::build).
Could IcebergDataSourceBuilder::build resolve the id, or the current snapshot when it's None, into an Option<SnapshotRef>, and return an error for an id that doesn't exist? Each consumer would then read the stored snapshot. A missing snapshot would fail at planning instead of at execution, and the Absent branch in estimated_num_rows would go away.
IcebergDataSource::snapshot_id() is public. It returns None today to mean "the current snapshot". If the source stores the resolved snapshot, None would mean "the table has no snapshot". The issue should settle which meaning the getter keeps before the change ships.
#67 restructures the builder's input (snapshot_id moves into its table input), so this should land after #67 or be rebased onto it.
Activity
alexanderbianchi commentedon Nov 19, 2026
FYI #67 is superseded by #113