apache/iceberg · error · UnsupportedOperationException

doesn't implement fromSnapshotInclusive

Error message

%s doesn't implement fromSnapshotInclusive

What it means

Default-interface guard on IncrementalScan: thrown only when the concrete scan implementation did not override fromSnapshotInclusive, so refining the scan by an inclusive start snapshot is unsupported for that class. The %s names the offending runtime class; it signals a missing capability in the implementation, not bad input.

Solutions

  1. Use a scan implementation that supports incremental scans (e.g. the core DataTableScan-based incremental scans)
  2. Catch UnsupportedOperationException and fall back to a non-incremental scan
  3. Extend the custom scan class and override fromSnapshotInclusive
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at api/src/main/java/org/apache/iceberg/IncrementalScan.java:47 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at api/src/main/java/org/apache/iceberg/IncrementalScan.java:47

   *
   * @param fromSnapshotId the start snapshot ID (inclusive)
   * @return this for method chaining
   * @throws IllegalArgumentException if the start snapshot is not an ancestor of the end snapshot
   */
  ThisT fromSnapshotInclusive(long fromSnapshotId);

  /**
   * Instructs this scan to look for changes starting from a particular snapshot (inclusive).
   *
   * <p>If the start snapshot is not configured, it defaults to the oldest ancestor of the end
   * snapshot (inclusive).
   *
   * @param ref the start ref name that points to a particular snapshot ID (inclusive)
   * @return this for method chaining
   * @throws IllegalArgumentException if the start snapshot is not an ancestor of the end snapshot
   */
  default ThisT fromSnapshotInclusive(String ref) {
    throw new UnsupportedOperationException(
        this.getClass().getName() + " doesn't implement fromSnapshotInclusive");
  }

  /**
   * Instructs this scan to look for changes starting from a particular snapshot (exclusive).
   *
   * <p>If the start snapshot is not configured, it defaults to the oldest ancestor of the end
   * snapshot (inclusive).
   *
   * @param fromSnapshotId the start snapshot ID (exclusive)
   * @return this for method chaining
   * @throws IllegalArgumentException if the start snapshot is not an ancestor of the end snapshot
   */
  ThisT fromSnapshotExclusive(long fromSnapshotId);

  /**
   * Instructs this scan to look for changes starting from a particular snapshot (exclusive).
   *

View on GitHub (pinned to 86d9c8fc54)