apache/iceberg · error · UnsupportedOperationException
this.getClass().getName() + " does not implement rewriteTabl
Error message
this.getClass().getName() + " does not implement rewriteTablePath"
What it means
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.
Source
Thrown at api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java:88
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(
this.getClass().getName() + " does not implement rewriteTablePath");
}
/** Instantiates an action to remove dangling delete files from current snapshot. */
default RemoveDanglingDeleteFiles removeDanglingDeleteFiles(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement removeDanglingDeleteFiles");
}
/** Instantiates an action to repair a table. */
default RepairTable repairTable(Table table) {
throw new UnsupportedOperationException(
this.getClass().getName() + " does not implement repairTable");
}
}
View on GitHub (pinned to 86d9c8fc54)
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.
Example fix
// before
RewriteTablePath action = customProvider.rewriteTablePath(table);
// after
RewriteTablePath action = SparkActions.get(table).rewriteTablePath().rewriteLocationPrefix("s3://old", "s3://new"); Defensive patterns
Strategy: try-catch
Validate before calling
// confirm the provider supports RewriteTablePath before calling
Class<?> c = provider.getClass();
boolean ok = Arrays.stream(c.getMethods()).anyMatch(m -> m.getName().equals("rewriteTablePath") && m.getDeclaringClass() != ActionsProvider.class); Type guard
boolean implemented = !provider.getClass().equals(ActionsProvider.class);
Try / catch
try { provider.rewriteTablePath(table); } catch (UnsupportedOperationException e) { throw new IllegalStateException("Runtime does not support rewriteTablePath", e); } Prevention
- Use SparkActions/FlinkActions for path rewriting
- Pin engine integration and core Iceberg to matching versions
When it happens
Trigger: Calling rewriteTablePath(table) on an ActionsProvider implementation lacking the override — typical with custom providers or engine runtimes without the rewrite-table-path action.
Common situations: Cross-location table copying attempted on a runtime that never implemented RewriteTablePath; a provider implementation written before the action was introduced and not updated.
Related errors
- this.getClass().getName() + " does not implement computePart
- this.getClass().getName() + " does not implement removeDangl
- this.getClass().getName() + " does not implement repairTable
- %s does not implement deleteFile
- %s does not implement addFile
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/2eb12a4e13854ea0.
Report an issue: GitHub.