{"record":{"id":"17b3e43cd3911815","repo":"apache/iceberg","slug":"deleting-data-and-delete-files-is-not-supported","errorCode":null,"errorMessage":"Deleting data and delete files is not supported","messagePattern":"Deleting data and delete files is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/OverwriteFiles.java","lineNumber":90,"sourceCode":"  /**\n   * Delete a {@link DataFile} from the table.\n   *\n   * @param file a data file\n   * @return this for method chaining\n   */\n  OverwriteFiles deleteFile(DataFile file);\n\n  /**\n   * Deletes a set of data files from the table with their respective delete files.\n   *\n   * @param dataFilesToDelete the data files to be deleted from the table\n   * @param deleteFilesToDelete the delete files corresponding to the data files to be deleted from\n   *     the table\n   * @return this for method chaining\n   */\n  default OverwriteFiles deleteFiles(\n      DataFileSet dataFilesToDelete, DeleteFileSet deleteFilesToDelete) {\n    throw new UnsupportedOperationException(\"Deleting data and delete files is not supported\");\n  }\n\n  /**\n   * Signal that each file added to the table must match the overwrite expression.\n   *\n   * <p>If this method is called, each added file is validated on commit to ensure that it matches\n   * the overwrite row filter. This is used to ensure that writes are idempotent: that files cannot\n   * be added during a commit that would not be removed if the operation were run a second time.\n   *\n   * @return this for method chaining\n   */\n  OverwriteFiles validateAddedFilesMatchOverwriteFilter();\n\n  /**\n   * Set the snapshot ID used in any reads for this operation.\n   *\n   * <p>Validations will check changes after this snapshot ID. If the from snapshot is not set, all\n   * ancestor snapshots through the table's initial snapshot are validated.","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/OverwriteFiles.java#L72-L108","documentation":"Default-method guard in OverwriteFiles: the deleteFiles(DataFileSet, DeleteFileSet) overload for jointly deleting data files and their associated delete files is not implemented by this table's overwrite operation. It fires when a caller uses the paired-set deletion API on an implementation that only supports single-file deletes — a capability gap, not a data problem.","triggerScenarios":"Thrown at api/src/main/java/org/apache/iceberg/OverwriteFiles.java:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete files one by one with deleteFile(DataFile) / deleteFile(DeleteFile) instead","Catch UnsupportedOperationException and surface that batched paired deletion is unsupported","Upgrade to an implementation that overrides deleteFiles"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}