Skip to content

Empty snapshot ID should be Null instead of -1 #352

Closed

Description

@Fokko

This is an old bug from Java. Where the Snapshot was set to -1 instead of None:

pub(crate) static EMPTY_SNAPSHOT_ID: i64 = -1;

From Java 1.5 and later this is fixed. For older version of Java, the current-snapshot-id is required. We solved this by setting a flag: apache/iceberg-python#473

Activity

  1. s-akhtar-baig commented on Apr 25, 2024

    @s-akhtar-baig
    Contributor

    @Fokko, can you please assign this to me? Thanks!

  2. Fokko commented on Apr 25, 2024

    @Fokko
    ContributorAuthor

    @s-akhtar-baig With pleasure 🙌

  3. gupteaj commented on May 6, 2024

    @gupteaj
    Contributor

    @Fokko , @liurenjie1024
    what changes are we looking for ?
    Since rust is using option to hold snapshot id internally, but writing as -1 for V2 manifest files.
    Does it need similar changes ( some variable ) as iceberg-python or empty snapshot id as -1 looks valid for rust.

  4. liurenjie1024 commented on May 24, 2024

    @liurenjie1024
    Contributor

    I took a look the code and found that maybe we don't need to change anything since we already handled this case:

    current_snapshot_id: if let &Some(id) = &value.current_snapshot_id {

    But it would be better to add some tests for it.

  5. github-actions commented on Oct 13, 2025

    @github-actions
    Contributor

    This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

  6. liurenjie1024 commented on Oct 14, 2025

    @liurenjie1024
    Contributor

    A bug to fix.

  7. added
    bugSomething isn't working
    and removed on Oct 14, 2025
  8. added a commit that references this issue on Mar 31, 2026
    14f2e14
  9. added a commit that references this issue on Apr 30, 2026
    6c8c139
  10. added a commit that references this issue on Jul 29, 2026
    ffbe91c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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