apache/iceberg · warning · UnsupportedOperationException

this.getClass().getName() + " doesn't implement removedDelet

Error message

this.getClass().getName() + " doesn't implement removedDeleteFiles"

What it means

Snapshot.removedDeleteFiles(FileIO) is a deprecated default method on the Snapshot interface; implementations are not required to provide it, and the default throws UnsupportedOperationException. It has been superseded by SnapshotChanges#builderFor(Table), so hitting this error means calling a legacy API against a Snapshot implementation that never implemented it.

Source

Thrown at api/src/main/java/org/apache/iceberg/Snapshot.java:162

  @Deprecated
  default Iterable<DeleteFile> addedDeleteFiles(FileIO io) {
    throw new UnsupportedOperationException(
        this.getClass().getName() + " doesn't implement addedDeleteFiles");
  }

  /**
   * Return all delete files removed from the table in this snapshot.
   *
   * <p>The files returned include the following columns: file_path, file_format, partition,
   * record_count, and file_size_in_bytes. Other columns will be null.
   *
   * @param io a {@link FileIO} instance used for reading files from storage
   * @return all delete files removed from the table in this snapshot
   * @deprecated will be removed in 2.0.0; use SnapshotChanges#builderFor(Table) instead
   */
  @Deprecated
  default Iterable<DeleteFile> removedDeleteFiles(FileIO io) {
    throw new UnsupportedOperationException(
        this.getClass().getName() + " doesn't implement removedDeleteFiles");
  }

  /**
   * Return the location of this snapshot's manifest list, or null if it is not separate.
   *
   * @return the location of the manifest list for this Snapshot
   */
  String manifestListLocation();

  /**
   * Return the id of the schema used when this snapshot was created, or null if this information is
   * not available.
   *
   * @return schema id associated with this snapshot
   */
  default Integer schemaId() {
    return null;

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Migrate to SnapshotChanges / changelog APIs: table.changelog() or SnapshotChanges.builderFor(table) instead of Snapshot.removedDeleteFiles.
  2. If the deprecated call is intentional, upgrade iceberg-core so the runtime Snapshot implementation (BaseSnapshot) overrides removedDeleteFiles.
  3. Remove the deprecated call path before the 2.0.0 removal.

Example fix

// before
Iterable<DeleteFile> removed = snapshot.removedDeleteFiles(io); // deprecated + unsupported
// after
Changelog changelog = table.changelog(); // use SnapshotChanges builder API
Defensive patterns

Strategy: fallback

Validate before calling

static boolean hasRemovedDeleteFiles(Snapshot s) {
  try { s.removedDeleteFiles(null); return true; } catch (UnsupportedOperationException e) { return false; } }

Try / catch

try {
  removed = snapshot.removedDeleteFiles(io);
} catch (UnsupportedOperationException e) {
  removed = table.changelog().deletedFiles(); // SnapshotChanges builder API
}

Prevention

When it happens

Trigger: Calling removedDeleteFiles(FileIO) directly on a Snapshot instance (e.g. a BaseSnapshot version or custom Snapshot) that does not override this deprecated method.

Common situations: Code written against the pre-2.0 deprecated incremental-scan API still running on newer Iceberg versions; copy-pasted older analysis code enumerating deleted delete files between snapshots.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/abe9a0b357d8b7ab. Report an issue: GitHub.