apache/iceberg · error · UnsupportedOperationException

this.getClass().getName() + " does not implement computeTabl

Error message

this.getClass().getName() + " does not implement computeTableStats"

What it means

ActionsProvider.computeTableStats(Table) is a default method that throws UnsupportedOperationException naming the implementing class, because that action provider does not implement the compute-table-stats action. Providers implement a subset of actions; unimplemented methods throw this fail-fast error.

Source

Thrown at api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java:76

    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(
        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(

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Use a provider implementation that supports computeTableStats (e.g. SparkActions for Spark).
  2. Implement computeTableStats(Table) in your custom ActionsProvider.
  3. Skip stats computation or use another mechanism to collect table statistics.
  4. Upgrade the integration/Iceberg version if support was added later.

Example fix

// before
MyProvider.get().computeTableStats(table).execute(); // throws

// after
SparkActions.get().computeTableStats(table).execute();
Defensive patterns

Strategy: try-catch

Validate before calling

// confirm provider support before calling; prefer canonical providers like SparkActions

Type guard

boolean supportsComputeTableStats = !(provider instanceof MinimalActionsProvider);

Try / catch

try {
  provider.computeTableStats(table).execute();
} catch (UnsupportedOperationException e) {
  SparkActions.get().computeTableStats(table).execute(); // capable provider
}

Prevention

When it happens

Trigger: Calling provider.computeTableStats(table) on an ActionsProvider implementation that has not overridden it, e.g. a custom provider or an engine integration without statistics computation support.

Common situations: Computing table statistics (for query planners / stats files) via a catalog- or engine-specific provider that lacks the action; custom ActionsProvider subclasses that only implement some actions.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/8c47d20996c697be. Report an issue: GitHub.