{"record":{"id":"8833ef6197de5a7a","repo":"apache/iceberg","slug":"update-type-s-is-not-supported","errorCode":null,"errorMessage":"Update type %s is not supported","messagePattern":"Update type (.+?) is not supported","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java","lineNumber":195,"sourceCode":"        updates =\n            ImmutableList.<MetadataUpdate>builder()\n                .addAll(createChanges)\n                .addAll(metadata.changes())\n                .build();\n        // use the original replace base metadata because the transaction will refresh\n        requirements = UpdateRequirements.forReplaceTable(replaceBase, updates);\n        errorHandler = ErrorHandlers.tableCommitHandler();\n        break;\n\n      case SIMPLE:\n        Preconditions.checkState(base != null, \"Invalid base metadata: null\");\n        updates = metadata.changes();\n        requirements = UpdateRequirements.forUpdateTable(base, updates);\n        errorHandler = ErrorHandlers.tableCommitHandler();\n        break;\n\n      default:\n        throw new UnsupportedOperationException(\n            String.format(\"Update type %s is not supported\", updateType));\n    }\n\n    UpdateTableRequest request = new UpdateTableRequest(requirements, updates);\n\n    // the error handler will throw necessary exceptions like CommitFailedException and\n    // UnknownCommitStateException\n    // TODO: ensure that the HTTP client lib passes HTTP client errors to the error handler\n    LoadTableResponse response;\n    try {\n      response = client.post(path, request, LoadTableResponse.class, mutationHeaders, errorHandler);\n    } catch (CommitStateUnknownException e) {\n      // Lightweight reconciliation for snapshot-add-only updates on transient unknown commit state\n      if (updateType == UpdateType.SIMPLE && reconcileOnSimpleUpdate(updates, e)) {\n        return;\n      }\n\n      throw e;","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/rest/RESTTableOperations.java#L177-L213","documentation":"An UnsupportedOperationException thrown from RESTTableOperations.commit when the TableMetadata update type is not one of the supported kinds (create, replace, or simple updates). The switch over updateType has a default branch that rejects any other update type, since the REST protocol can only express the mapped request shapes.","triggerScenarios":"Committing table metadata whose first change is an update type the REST integration does not map — e.g. metadata changes produced by operations outside the create/replace/standard-update set that RESTTableOperations.commit supports.","commonSituations":"Combining snapshot/expire operations or unusual metadata mutations with a REST catalog commit; custom code constructing TableMetadata changes directly; engine integrations producing newer update kinds before the REST client added support.","solutions":["Check the message's update type and split the commit so unsupported change kinds are not mixed into a REST catalog commit.","Upgrade Iceberg — support for additional update types in REST commits is added over time.","Perform unsupported operations through the engine/catalog API that owns them rather than raw metadata commits.","Inspect TableMetadata.changes() to identify which update kind triggered the default branch."],"exampleFix":"// before\nops.commit(base, metadata.withAll(changes)); // unsupported update type mixed in\n// after\nops.commit(base, metadata.withChanges(supportedChanges)); // only create/replace/standard updates","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { ops.commit(base, metadata); } catch (UnsupportedOperationException e) { /* update type unsupported by REST commit: split or upgrade */ }","preventionTips":["Only commit metadata changes produced by supported operations (create/replace/standard updates)","Inspect TableMetadata.changes() before committing through RESTTableOperations","Upgrade Iceberg when using newer update kinds with REST catalogs","Keep raw metadata commits out of application code"],"tags":["rest","commit","unsupported-operation","metadata"],"backgroundTag":"unsupported-operation","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"}