{"record":{"id":"8c47d20996c697be","repo":"apache/iceberg","slug":"this-getclass-getname-does-not-implement-c-8c47d2","errorCode":null,"errorMessage":"this.getClass().getName() + \" does not implement computeTableStats\"","messagePattern":"this\\.getClass\\(\\)\\.getName\\(\\) \\+ \" does not implement computeTableStats\"","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java","lineNumber":76,"sourceCode":"    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" does not implement expireSnapshots\");\n  }\n\n  /** Instantiates an action to delete all the files reachable from given metadata location. */\n  default DeleteReachableFiles deleteReachableFiles(String metadataLocation) {\n    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(","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java#L58-L94","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use a provider implementation that supports computeTableStats (e.g. SparkActions for Spark).","Implement computeTableStats(Table) in your custom ActionsProvider.","Skip stats computation or use another mechanism to collect table statistics.","Upgrade the integration/Iceberg version if support was added later."],"exampleFix":"// before\nMyProvider.get().computeTableStats(table).execute(); // throws\n\n// after\nSparkActions.get().computeTableStats(table).execute();","handlingStrategy":"try-catch","validationCode":"// confirm provider support before calling; prefer canonical providers like SparkActions","typeGuard":"boolean supportsComputeTableStats = !(provider instanceof MinimalActionsProvider);","tryCatchPattern":"try {\n  provider.computeTableStats(table).execute();\n} catch (UnsupportedOperationException e) {\n  SparkActions.get().computeTableStats(table).execute(); // capable provider\n}","preventionTips":["Call computeTableStats via the engine-specific action registry.","Fully implement ActionsProvider methods in custom providers.","Gate stats-computation features on provider capability checks."],"tags":["unsupported-operation","actions","statistics","maintenance"],"backgroundTag":"operation-not-supported","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"}