apache/iceberg · error · UnsupportedOperationException

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

Error message

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

What it means

ActionsProvider is an interface of default factory methods that instantiate maintenance actions (like ComputePartitionStats) on a Table. Each default method throws UnsupportedOperationException because the concrete implementation (e.g., the Spark, Flink, or a custom catalog's action provider) has not overridden it. It signals that the chosen engine/catalog runtime does not support this action factory.

Source

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

    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(
        this.getClass().getName() + " does not implement removeDanglingDeleteFiles");
  }

  /** Instantiates an action to repair a table. */
  default RepairTable repairTable(Table table) {
    throw new UnsupportedOperationException(

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Use the engine-specific action provider that implements the action (e.g., SparkActions.get(table) instead of a generic/custom provider).
  2. Upgrade the engine integration module (iceberg-spark / iceberg-flink / iceberg-aws) to a version that implements computePartitionStats.
  3. If you own the ActionsProvider implementation, override computePartitionStats to return a concrete ComputePartitionStats action.

Example fix

// before
ComputePartitionStats action = myMinimalProvider.computePartitionStats(table);
// after
ComputePartitionStats action = SparkActions.get(table).computePartitionStats();
Defensive patterns

Strategy: try-catch

Validate before calling

if (!(provider instanceof ComputePartitionStatsProvider)) { /* use SparkActions/FlinkActions instead */ }

Type guard

boolean supports = provider.getClass().getDeclaredMethods() != null && provider.getClass() != ActionsProvider.class;

Try / catch

try { provider.computePartitionStats(table); } catch (UnsupportedOperationException e) { fallbackToEngineActions(table); }

Prevention

When it happens

Trigger: Calling computePartitionStats(table) on an ActionsProvider implementation that does not override that method — e.g., a custom or minimal action provider, or an older engine integration predating the partition-stats action.

Common situations: Using a custom Catalog that returns a partial ActionsProvider; upgrading Iceberg in one module but not the engine bindings; copying code that assumes SparkActions but running against Flink or a lightweight test provider.

Related errors


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