{"record":{"id":"091b36af92853165","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-c-091b36","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement computePartitionStats\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement computePartitionStats\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java","lineNumber":82,"sourceCode":"    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(\n        this.getClass().getName() + \" does not implement rewriteTablePath\");\n  }\n\n  /** Instantiates an action to remove dangling delete files from current snapshot. */\n  default RemoveDanglingDeleteFiles removeDanglingDeleteFiles(Table table) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement removeDanglingDeleteFiles\");\n  }\n\n  /** Instantiates an action to repair a table. */\n  default RepairTable repairTable(Table table) {\n    throw new UnsupportedOperationException(","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java#L64-L100","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use the engine-specific action provider that implements the action (e.g., SparkActions.get(table) instead of a generic/custom provider).","Upgrade the engine integration module (iceberg-spark / iceberg-flink / iceberg-aws) to a version that implements computePartitionStats.","If you own the ActionsProvider implementation, override computePartitionStats to return a concrete ComputePartitionStats action."],"exampleFix":"// before\nComputePartitionStats action = myMinimalProvider.computePartitionStats(table);\n// after\nComputePartitionStats action = SparkActions.get(table).computePartitionStats();","handlingStrategy":"try-catch","validationCode":"if (!(provider instanceof ComputePartitionStatsProvider)) { /* use SparkActions/FlinkActions instead */ }","typeGuard":"boolean supports = provider.getClass().getDeclaredMethods() != null && provider.getClass() != ActionsProvider.class;","tryCatchPattern":"try { provider.computePartitionStats(table); } catch (UnsupportedOperationException e) { fallbackToEngineActions(table); }","preventionTips":["Always obtain actions from the engine-specific provider (SparkActions.get / FlinkActions.get)","Check the engine integration version against the Iceberg API version before using newer actions"],"tags":["java","iceberg","unsupported-operation","actions-provider"],"backgroundTag":"method-not-implemented","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"}