{"record":{"id":"cdc068a5e4a2624c","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-r-cdc068","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement repairTable\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement repairTable\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java","lineNumber":100,"sourceCode":"    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":82,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java#L82-L104","documentation":"The default repairTable factory method in ActionsProvider throws UnsupportedOperationException when the concrete provider does not implement it. RepairTable fixes corrupt table metadata (e.g., recovering from the metadata.json history); providers that don't support it throw at call time.","triggerScenarios":"Calling repairTable(table) on an ActionsProvider without the override — custom providers, minimal test providers, or engine runtimes that never implemented table repair.","commonSituations":"Attempted metadata repair in an environment where the repair action is unavailable; provider implementations not updated alongside the API.","solutions":["Invoke repairTable via a provider that implements it (e.g., SparkActions.get(table)).","Upgrade the engine integration module to a version implementing repairTable.","Override repairTable in your custom ActionsProvider to return a concrete RepairTable action."],"exampleFix":"// before\nRepairTable a = customProvider.repairTable(table);\n// after\nRepairTable a = SparkActions.get(table).repairTable();","handlingStrategy":"try-catch","validationCode":"boolean ok = Arrays.stream(provider.getClass().getMethods()).anyMatch(m -> \"repairTable\".equals(m.getName()) && m.getDeclaringClass() != ActionsProvider.class);","typeGuard":"boolean implemented = provider.getClass() != ActionsProvider.class;","tryCatchPattern":"try { provider.repairTable(table); } catch (UnsupportedOperationException e) { throw new IllegalStateException(\"repairTable not available in this runtime\", e); }","preventionTips":["Run repair via a fully featured provider such as SparkActions","Keep custom ActionsProvider implementations in sync with the API"],"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"}