You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "emalit (via GitHub)" <gi...@apache.org> on 2026/02/12 19:00:54 UTC

[I] [Bug] Allow "IF NOT EXISTS" check on branches [paimon]

emalit opened a new issue, #7277:
URL: https://github.com/apache/paimon/issues/7277

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
   
   
   ### Paimon version
   
   Paimon 1.2.0
   
   ### Compute Engine
   
   Flink 1.20.1
   
   ### Minimal reproduce step
   
   1. Create a paimon table for a sink
   2. Create an empty branch for that table
   3. Create a Flink job that takes data from any source and sinks it into that branch
   4. Re-run the job
   
   ### What doesn't meet your expectations?
   
   Upon re-running the job, I get this error:
   
   ```
   Caused by: java.lang.IllegalArgumentException: Branch name 'my_branch_name' already exists.
   ```
   
   Since flink jobs can be restarted and redeployed, we should have a way to check whether the branch name already exists and skip creating it. For example, CREATE TABLE can be modified by IF NOT EXISTS. This should also be available for branches.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Allow "IF NOT EXISTS" check on branches [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi closed issue #7277: [Bug] Allow "IF NOT EXISTS" check on branches
URL: https://github.com/apache/paimon/issues/7277


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Allow "IF NOT EXISTS" check on branches [paimon]

Posted by "dark2momo (via GitHub)" <gi...@apache.org>.
dark2momo commented on issue #7277:
URL: https://github.com/apache/paimon/issues/7277#issuecomment-4009363312

    I've submitted PR #7353 to fix this issue.                                                                                                                                    
                                                                                                                                                                                   
     The fix adds an optional `ignoreIfExists` parameter to the `create_branch` operation:                                                                                         
     - **Default behavior**: keeps the original behavior (throws exception if branch exists)                                                                                       
     - **With `ignoreIfExists = true`**: silently skips creation if branch already exists                                                                                          
                                                                                                                                                                                   
     This is similar to how `CREATE TABLE IF NOT EXISTS` works in SQL.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org