apache/iceberg · error · UnsupportedOperationException
this.getClass().getName() + " does not implement rewritePosi
Error message
this.getClass().getName() + " does not implement rewritePositionDeletes"
What it means
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.
Source
Thrown at api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java:70
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement rewriteDataFiles");
}
/** Instantiates an action to expire snapshots. */
default ExpireSnapshots expireSnapshots(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement expireSnapshots");
}
/** Instantiates an action to delete all the files reachable from given metadata location. */
default DeleteReachableFiles deleteReachableFiles(String metadataLocation) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement deleteReachableFiles");
}
/** Instantiates an action to rewrite position delete files */
default RewritePositionDeleteFiles rewritePositionDeletes(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement rewritePositionDeletes");
}
/** Instantiates an action to compute table stats. */
default ComputeTableStats computeTableStats(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement computeTableStats");
}
/** Instantiates an action to compute partition stats. */
default ComputePartitionStats computePartitionStats(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement computePartitionStats");
}
/** Instantiates an action to rewrite all absolute paths in table metadata. */
default RewriteTablePath rewriteTablePath(Table table) {
throw new UnsupportedOperationException(View on GitHub (pinned to 86d9c8fc54)
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.
Example fix
// before MyProvider.get().rewritePositionDeletes(table).execute(); // throws // after SparkActions.get().rewritePositionDeletes(table).execute();
Defensive patterns
Strategy: try-catch
Validate before calling
// confirm the provider supports the action before invoking: // prefer well-known providers (SparkActions) over custom ActionProviders
Type guard
boolean supportsRewritePositionDeletes = !(provider instanceof MinimalActionsProvider);
Try / catch
try {
provider.rewritePositionDeletes(table).execute();
} catch (UnsupportedOperationException e) {
// switch to a provider that implements the action
SparkActions.get().rewritePositionDeletes(table).execute();
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- this.getClass().getName() + " does not implement computeTabl
- %s doesn't implement copyWithStats
- %s doesn't implement validateFilesExist
- Can't retrieve values from an empty struct
- Can't modify an empty struct
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/a6c961025204f47d.
Report an issue: GitHub.