{"record":{"id":"e319abe2209094a3","repo":"apache/iceberg","slug":"cannot-read-unknown-manifest-type-s","errorCode":null,"errorMessage":"Cannot read unknown manifest type: %s","messagePattern":"Cannot read unknown manifest type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/BaseScan.java","lineNumber":320,"sourceCode":"  @Override\n  public ThisT minRowsRequested(long numRows) {\n    return newRefinedScan(table, schema, context.minRowsRequested(numRows));\n  }\n\n  /**\n   * Retrieves a list of column names based on the type of manifest content provided.\n   *\n   * @param content the manifest content type to scan.\n   * @return a list of column names corresponding to the specified manifest content type.\n   */\n  static List<String> scanColumns(ManifestContent content) {\n    switch (content) {\n      case DATA:\n        return BaseScan.SCAN_COLUMNS;\n      case DELETES:\n        return BaseScan.DELETE_SCAN_COLUMNS;\n      default:\n        throw new UnsupportedOperationException(\"Cannot read unknown manifest type: \" + content);\n    }\n  }\n}\n","sourceCodeStart":302,"sourceCodeEnd":324,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/BaseScan.java#L302-L324","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Upgrade the Iceberg runtime (all engines) to at least the version that wrote the table","Align iceberg-spark/flink bundle versions with the writer's version","Inspect the manifest list for corruption (audit the metadata files)","If reproducible with a valid table, file a bug with the table's format version and Iceberg versions"],"exampleFix":"// before: mixed versions\nspark --packages org.apache.iceberg:iceberg-spark-runtime-3.4_2.12:1.2.0\n// after: match writer version\nspark --packages org.apache.iceberg:iceberg-spark-runtime-3.4_2.12:1.5.2","handlingStrategy":"type-guard","validationCode":"ManifestContent content = manifest.content();\nif (content != ManifestContent.DATA && content != ManifestContent.DELETES) {\n  throw new IllegalStateException(\"unknown manifest content \" + content + \"; upgrade Iceberg\");\n}","typeGuard":"boolean knownContent(ManifestContent c) { return c == ManifestContent.DATA || c == ManifestContent.DELETES; }","tryCatchPattern":"try { table.newScan().planFiles(); } catch (UnsupportedOperationException e) { throw new IllegalStateException(\"table written by newer Iceberg; upgrade runtime\", e); }","preventionTips":["Pin all engines to the same Iceberg version as the writer","Upgrade the Iceberg bundle before reading tables written by newer versions","Validate table metadata after migrations"],"tags":["iceberg","version-skew","manifest-content"],"backgroundTag":"unsupported-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}