{"record":{"id":"c25e75b6ace0a7fa","repo":"apache/iceberg","slug":"s-doesn-t-implement-createbranch-string","errorCode":null,"errorMessage":"%s doesn't implement createBranch(String)","messagePattern":"(.+?) doesn't implement createBranch\\(String\\)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/ManageSnapshots.java","lineNumber":96,"sourceCode":"   *\n   * @param snapshotId a snapshotId whose changes to apply\n   * @return this for method chaining\n   * @throws IllegalArgumentException If the table has no snapshot with the given id\n   * @throws DuplicateWAPCommitException In case of a WAP workflow and if the table has a duplicate\n   *     commit with same wapId\n   */\n  ManageSnapshots cherrypick(long snapshotId);\n\n  /**\n   * Create a new branch. The branch will point to current snapshot if the current snapshot is not\n   * NULL. Otherwise, the branch will point to a newly created empty snapshot.\n   *\n   * @param name branch name\n   * @return this for method chaining\n   * @throws IllegalArgumentException if a branch with the given name already exists\n   */\n  default ManageSnapshots createBranch(String name) {\n    throw new UnsupportedOperationException(\n        this.getClass().getName() + \" doesn't implement createBranch(String)\");\n  }\n\n  /**\n   * Create a new branch pointing to the given snapshot id.\n   *\n   * @param name branch name\n   * @param snapshotId id of the snapshot which will be the head of the branch\n   * @return this for method chaining\n   * @throws IllegalArgumentException if a branch with the given name already exists\n   */\n  ManageSnapshots createBranch(String name, long snapshotId);\n\n  /**\n   * Create a new tag pointing to the given snapshot id\n   *\n   * @param name tag name\n   * @param snapshotId snapshotId for the head of the new tag.","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/ManageSnapshots.java#L78-L114","documentation":"Default-interface guard in ManageSnapshots: thrown when createBranch(String) is invoked on a snapshot manager implementation that did not override the single-argument branch creation overload. The %s names the runtime class, so the caller can see which implementation lacks branch support; input arguments are irrelevant to the failure.","triggerScenarios":"Thrown at api/src/main/java/org/apache/iceberg/ManageSnapshots.java:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the two-argument createBranch(name, snapshotId) overload which implementations typically support","Catch UnsupportedOperationException and report that branch operations are unsupported by this table","Upgrade or fix the snapshot manager implementation to override createBranch(String)"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}