{"record":{"id":"1e68a1391f7003c8","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-r-1e68a1","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement removeDanglingDeleteFiles\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement removeDanglingDeleteFiles\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java","lineNumber":94,"sourceCode":"    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement computeTableStats\");\n  }\n\n  /** Instantiates an action to compute partition stats. */\n  default ComputePartitionStats computePartitionStats(Table table) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement computePartitionStats\");\n  }\n\n  /** Instantiates an action to rewrite all absolute paths in table metadata. */\n  default RewriteTablePath rewriteTablePath(Table table) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement rewriteTablePath\");\n  }\n\n  /** Instantiates an action to remove dangling delete files from current snapshot. */\n  default RemoveDanglingDeleteFiles removeDanglingDeleteFiles(Table table) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement removeDanglingDeleteFiles\");\n  }\n\n  /** Instantiates an action to repair a table. */\n  default RepairTable repairTable(Table table) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement repairTable\");\n  }\n}\n","sourceCodeStart":76,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java#L76-L104","documentation":"The default removeDanglingDeleteFiles factory method in ActionsProvider throws UnsupportedOperationException when the concrete provider does not implement it. This action removes delete files no longer referenced by the current snapshot; providers without the implementation reject the call.","triggerScenarios":"Calling removeDanglingDeleteFiles(table) on a provider that has not overridden the default method, such as a minimal custom ActionsProvider or an older engine binding.","commonSituations":"Maintenance jobs run against a provider lacking this action; version skew between the Iceberg API and the engine integration dependency.","solutions":["Use a fully implemented provider (e.g., SparkActions.get(table)) that overrides removeDanglingDeleteFiles.","Upgrade the engine integration module to a version implementing the action.","Override removeDanglingDeleteFiles in your custom ActionsProvider implementation."],"exampleFix":"// before\nRemoveDanglingDeleteFiles a = customProvider.removeDanglingDeleteFiles(table);\n// after\nRemoveDanglingDeleteFiles a = SparkActions.get(table).removeDanglingDeleteFiles();","handlingStrategy":"try-catch","validationCode":"boolean ok = Arrays.stream(provider.getClass().getMethods()).anyMatch(m -> \"removeDanglingDeleteFiles\".equals(m.getName()) && m.getDeclaringClass() != ActionsProvider.class);","typeGuard":"boolean implemented = provider.getClass() != ActionsProvider.class;","tryCatchPattern":"try { provider.removeDanglingDeleteFiles(table); } catch (UnsupportedOperationException e) { useAlternativeCleanup(table); }","preventionTips":["Prefer engine-provided action providers","Verify action availability for your Iceberg version before scheduling maintenance jobs"],"tags":["java","iceberg","unsupported-operation","actions-provider"],"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"}