{"record":{"id":"61778349835729a9","repo":"apache/iceberg","slug":"unexpected-delete-file-content-617783","errorCode":null,"errorMessage":"Unexpected delete file content: ","messagePattern":"Unexpected delete file content: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/TableChange.java","lineNumber":85,"sourceCode":"    dataFiles.forEach(\n        dataFile -> {\n          this.dataFileCount++;\n          this.dataFileSizeInBytes += dataFile.fileSizeInBytes();\n        });\n\n    deleteFiles.forEach(\n        deleteFile -> {\n          switch (deleteFile.content()) {\n            case POSITION_DELETES:\n              this.posDeleteFileCount++;\n              this.posDeleteRecordCount += deleteFile.recordCount();\n              break;\n            case EQUALITY_DELETES:\n              this.eqDeleteFileCount++;\n              this.eqDeleteRecordCount += deleteFile.recordCount();\n              break;\n            default:\n              throw new IllegalArgumentException(\"Unexpected delete file content: \" + deleteFile);\n          }\n        });\n\n    this.commitCount = 1;\n  }\n\n  static TableChange empty() {\n    return new TableChange(0, 0L, 0, 0L, 0, 0L, 0);\n  }\n\n  public static Builder builder() {\n    return new Builder();\n  }\n\n  int dataFileCount() {\n    return dataFileCount;\n  }\n","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/TableChange.java#L67-L103","documentation":"TableChange accumulates counts of delete files by content type, supporting POSITION_DELETES and EQUALITY_DELETES. Any DeleteFile whose content() is neither (e.g. DV-style or a future content type) triggers this IllegalArgumentException. It means the maintenance operator encountered a delete file content type it does not know how to account for.","triggerScenarios":"A snapshot added delete files whose content is not POSITION_DELETES or EQUALITY_DELETES while TableChange is built from snapshot changes.","commonSituations":"Running the maintenance (rewrite/expire) operator against tables written with newer Iceberg features (e.g. deletion vectors) using an older Iceberg version that does not model that content type.","solutions":["Upgrade the Iceberg Flink runtime to a version that supports the delete file content type in the table.","Check whether the table uses deletion vectors (format v3) and disable them or use a compatible writer if the maintenance job cannot be upgraded.","Identify the offending delete file from the exception message and inspect its content type."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (deleteFile.content() != FileContent.POSITION_DELETES\n    && deleteFile.content() != FileContent.EQUALITY_DELETES) {\n  throw new IllegalStateException(\"Unsupported delete content: \" + deleteFile.content());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Upgrade the Iceberg Flink runtime before enabling format-v3 features like deletion vectors on tables processed by the maintenance job.","Check table properties (format-version, write.delete.mode) for unsupported delete content."],"tags":["flink","delete-files","unsupported-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-14T16:17:12.679Z"}