{"record":{"id":"d2ec4293f9dca34e","repo":"apache/iceberg","slug":"s-doesn-t-implement-validatefilesexist","errorCode":null,"errorMessage":"%s doesn't implement validateFilesExist","messagePattern":"(.+?) doesn't implement validateFilesExist","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/DeleteFiles.java","lineNumber":92,"sourceCode":"   */\n  DeleteFiles deleteFromRowFilter(Expression expr);\n\n  /**\n   * Enables or disables case sensitive expression binding for methods that accept expressions.\n   *\n   * @param caseSensitive whether expression binding should be case sensitive\n   * @return this for method chaining\n   */\n  DeleteFiles caseSensitive(boolean caseSensitive);\n\n  /**\n   * Enables validation that any files that are part of the deletion still exist when committing the\n   * operation.\n   *\n   * @return this for method chaining\n   */\n  default DeleteFiles validateFilesExist() {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" doesn't implement validateFilesExist\");\n  }\n}\n","sourceCodeStart":74,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/DeleteFiles.java#L74-L96","documentation":"DeleteFiles.validateFilesExist() is a default interface method; engines must override it to enable existence validation of deleted files at commit. The default throws UnsupportedOperationException naming the implementing class, signalling the operation is not supported by that implementation.","triggerScenarios":"Calling validateFilesExist() on a DeleteFiles instance whose implementation (e.g. a custom or minimal RowLevelOperation builder) does not override it.","commonSituations":"Using a third-party or custom catalog's delete builder that lacks this feature; wiring the API interface directly instead of the engine's full implementation; version skew where the implementation predates the method.","solutions":["Use the standard implementation (BaseOverwrite/BaseDeleteFiles from iceberg-core via table.newDelete()) which supports validateFilesExist.","Remove the validateFilesExist() call if existence validation is not required.","If you implement DeleteFiles, override validateFilesExist() to record the validation and implement it in the commit path.","Align iceberg-api and implementation jar versions."],"exampleFix":"// before (custom impl)\nclass MyDelete implements DeleteFiles { }\n\n// after\n@Override\npublic DeleteFiles validateFilesExist() {\n  this.validateExistence = true;\n  return this;\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"DeleteFiles delete;\ntry {\n  delete = table.newDelete().validateFilesExist();\n} catch (UnsupportedOperationException e) {\n  delete = table.newDelete(); // skip existence validation or switch implementation\n}","preventionTips":["Use table.newDelete() from iceberg-core, which supports validateFilesExist.","Check feature support of custom catalogs before relying on validation options.","Keep implementation and API versions aligned."],"tags":["unsupported-operation","delete","api"],"backgroundTag":"method-not-implemented","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"}