apache/iceberg · error · UnsupportedOperationException

Cannot read unknown manifest type

Error message

Cannot read unknown manifest type: %s

What it means

When planning which manifest columns to scan, BaseScan.switchScanColumns only knows DATA and DELETES manifest content types. An unknown ManifestContent value reaches the switch and throws UnsupportedOperationException. This is a defensive check that should be unreachable with valid snapshots.

Solutions

  1. Upgrade the Iceberg runtime (all engines) to at least the version that wrote the table
  2. Align iceberg-spark/flink bundle versions with the writer's version
  3. Inspect the manifest list for corruption (audit the metadata files)
  4. If reproducible with a valid table, file a bug with the table's format version and Iceberg versions

Example fix

// before: mixed versions
spark --packages org.apache.iceberg:iceberg-spark-runtime-3.4_2.12:1.2.0
// after: match writer version
spark --packages org.apache.iceberg:iceberg-spark-runtime-3.4_2.12:1.5.2
Defensive patterns

Strategy: type-guard

Validate before calling

ManifestContent content = manifest.content();
if (content != ManifestContent.DATA && content != ManifestContent.DELETES) {
  throw new IllegalStateException("unknown manifest content " + content + "; upgrade Iceberg");
}

Type guard

boolean knownContent(ManifestContent c) { return c == ManifestContent.DATA || c == ManifestContent.DELETES; }

Try / catch

try { table.newScan().planFiles(); } catch (UnsupportedOperationException e) { throw new IllegalStateException("table written by newer Iceberg; upgrade runtime", e); }

Prevention

When it happens

Trigger: A snapshot's manifest list contains a ManifestFile with a content type unknown to this Iceberg version (e.g. reading a table written by a newer Iceberg/spec revision), or a corrupt/hand-crafted manifest list.

Common situations: Version skew: a newer client wrote the table and an older engine/core reads it; rolling upgrades where Spark bundles an older iceberg-core than the writer; corrupted metadata from a bad write.

Related errors


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

Appendix: source

Thrown at core/src/main/java/org/apache/iceberg/BaseScan.java:320

  @Override
  public ThisT minRowsRequested(long numRows) {
    return newRefinedScan(table, schema, context.minRowsRequested(numRows));
  }

  /**
   * Retrieves a list of column names based on the type of manifest content provided.
   *
   * @param content the manifest content type to scan.
   * @return a list of column names corresponding to the specified manifest content type.
   */
  static List<String> scanColumns(ManifestContent content) {
    switch (content) {
      case DATA:
        return BaseScan.SCAN_COLUMNS;
      case DELETES:
        return BaseScan.DELETE_SCAN_COLUMNS;
      default:
        throw new UnsupportedOperationException("Cannot read unknown manifest type: " + content);
    }
  }
}

View on GitHub (pinned to 86d9c8fc54)