Skip to content

Resolve the scan's snapshot once when building IcebergDataSource #118

Open

Description

@mbutrovich

IcebergDataSource stores snapshot_id: Option<i64>, and each consumer resolves it against the table metadata again:

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.

This came up in review of #114: #114 (comment)

Activity

  1. alexanderbianchi commented on Nov 19, 2026

    @alexanderbianchi
    Contributor

    FYI #67 is superseded by #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions