{"record":{"id":"2eb12a4e13854ea0","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-r-2eb12a","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement rewriteTablePath\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement rewriteTablePath\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java","lineNumber":88,"sourceCode":"    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement rewritePositionDeletes\");\n  }\n\n  /** Instantiates an action to compute table stats. */\n  default ComputeTableStats computeTableStats(Table table) {\n    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":70,"sourceCodeEnd":104,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java#L70-L104","documentation":"The default rewriteTablePath factory method in ActionsProvider throws UnsupportedOperationException when the concrete provider does not implement it. RewriteTablePath rewrites all absolute paths in table metadata (used for table/copy migration between locations), so providers without that capability refuse the request at instantiation time.","triggerScenarios":"Calling rewriteTablePath(table) on an ActionsProvider implementation lacking the override — typical with custom providers or engine runtimes without the rewrite-table-path action.","commonSituations":"Cross-location table copying attempted on a runtime that never implemented RewriteTablePath; a provider implementation written before the action was introduced and not updated.","solutions":["Switch to a provider implementation that supports RewriteTablePath (e.g., SparkActions.get(table)).","Upgrade the engine/catalog integration module to a version implementing rewriteTablePath.","Override rewriteTablePath in your custom ActionsProvider to return a concrete RewriteTablePath action."],"exampleFix":"// before\nRewriteTablePath action = customProvider.rewriteTablePath(table);\n// after\nRewriteTablePath action = SparkActions.get(table).rewriteTablePath().rewriteLocationPrefix(\"s3://old\", \"s3://new\");","handlingStrategy":"try-catch","validationCode":"// confirm the provider supports RewriteTablePath before calling\nClass<?> c = provider.getClass();\nboolean ok = Arrays.stream(c.getMethods()).anyMatch(m -> m.getName().equals(\"rewriteTablePath\") && m.getDeclaringClass() != ActionsProvider.class);","typeGuard":"boolean implemented = !provider.getClass().equals(ActionsProvider.class);","tryCatchPattern":"try { provider.rewriteTablePath(table); } catch (UnsupportedOperationException e) { throw new IllegalStateException(\"Runtime does not support rewriteTablePath\", e); }","preventionTips":["Use SparkActions/FlinkActions for path rewriting","Pin engine integration and core Iceberg to matching versions"],"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"}