Skip to content

[Bug] Allow "IF NOT EXISTS" check on branches #7277

@emalit

Description

@emalit

Search before asking

  • I searched in the 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, it crashes with 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 so redeploying the job doesn't crash.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions