{"record":{"id":"a6c961025204f47d","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-r","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement rewritePositionDeletes\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement rewritePositionDeletes\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java","lineNumber":70,"sourceCode":"    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement rewriteDataFiles\");\n  }\n\n  /** Instantiates an action to expire snapshots. */\n  default ExpireSnapshots expireSnapshots(Table table) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement expireSnapshots\");\n  }\n\n  /** Instantiates an action to delete all the files reachable from given metadata location. */\n  default DeleteReachableFiles deleteReachableFiles(String metadataLocation) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement deleteReachableFiles\");\n  }\n\n  /** Instantiates an action to rewrite position delete files */\n  default RewritePositionDeleteFiles rewritePositionDeletes(Table table) {\n    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(","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java#L52-L88","documentation":"ActionsProvider.rewritePositionDeletes(Table) is a default method that throws UnsupportedOperationException naming the implementing class, because that action provider does not implement an action to rewrite position delete files. Action providers may implement only a subset of the available actions; unimplemented ones fail fast with this error.","triggerScenarios":"Calling SparkActions/ActionsProvider.rewritePositionDeletes(table) (or an equivalent provider method) on a provider implementation that has not overridden it, e.g. a custom catalog's actions provider lacking position-delete rewrite support.","commonSituations":"Running maintenance jobs (compaction of position delete files) against a catalog or engine integration whose action provider does not implement the action; custom ActionProvider subclasses that override only some actions.","solutions":["Use an action provider implementation that supports rewritePositionDeletes (e.g. the Spark action registry for your engine).","Implement rewritePositionDeletes(Table) in your custom ActionsProvider.","Use an alternative maintenance approach (e.g. rewriteDataFiles with delete handling) if rewrite of position deletes is unavailable.","Upgrade the engine integration/Iceberg version if support was added later."],"exampleFix":"// before\nMyProvider.get().rewritePositionDeletes(table).execute(); // throws\n\n// after\nSparkActions.get().rewritePositionDeletes(table).execute();","handlingStrategy":"try-catch","validationCode":"// confirm the provider supports the action before invoking:\n// prefer well-known providers (SparkActions) over custom ActionProviders","typeGuard":"boolean supportsRewritePositionDeletes = !(provider instanceof MinimalActionsProvider);","tryCatchPattern":"try {\n  provider.rewritePositionDeletes(table).execute();\n} catch (UnsupportedOperationException e) {\n  // switch to a provider that implements the action\n  SparkActions.get().rewritePositionDeletes(table).execute();\n}","preventionTips":["Use the canonical engine action registry (e.g. SparkActions) for maintenance actions.","When writing custom ActionsProvider, implement all actions or document supported ones.","Check provider capabilities before scheduling maintenance jobs."],"tags":["unsupported-operation","actions","position-deletes","maintenance"],"backgroundTag":"operation-not-supported","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"}