Skip to content

Scan projects a stale schema after a schema update with no write #2905

Description

@NoahKusaba

Apache Iceberg Rust version

None

Describe the bug

Schema updates don't create snapshots. So after ADD COLUMN with no write since, the current snapshot still references the older schema — and scanning the current state used it:

// table (id, name) with a row written, then a column added
table.scan().select(["email"]).build() // Err: Column email not found in table
table.scan().select_all().build() // silently returns only (id, name)

email is a real column on the table, but invisible to the scan. Any subsequent write hides the problem, which is why it went unnoticed.

To Reproduce

for an existing table, add a column, then try to read from that column (error)

Expected behavior

Should return column with null

Willingness to contribute

I can contribute a fix for this bug independently

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions