Skip to content

[Feature] Support Iceberg branch/tag #48285

Description

@wuwenchi

Search before asking

  • I had searched in the issues and found no similar issues.

Description

  • branch/tag read, like
SELECT*FROM [catalog.][db.]table@branch("test_branch");
SELECT*FROM [catalog.][db.]table VERSION AS OF 'test_branch';
SELECT*FROM [catalog.][db.]table@branch("test_branch");
SELECT*FROM [catalog.][db.]table VERSION AS OF 'test_branch';

If you want to check which branches/tags this table contains, you can use the system table refs to view them, like

select*from [catalog.][db.]table$refs;

and progress of the refs system table is included here #48278 .

  • branch/tag create, like
ALTERTABLE [catalog.][db.]table
CREATE TAG tag_name AS OF VERSION version
[RETAIN num DAYS];
ALTERTABLE [catalog.][db.]table
CREATE BRANCH branch_name
[AS OF VERSION version]
[RETAIN num DAYS]
[WITH SNAPSHOT RETENTION num SNAPSHOTS];
  • branch/tag drop, like
ALTERTABLE [catalog.][db.]table DROP BRANCH branch_name;
ALTERTABLE [catalog.][db.]table DROP TAG tag_name;
  • branch/tag write, like
Insert into [catalog.][db.]table@branch("test_branch") values ();

Use case

No response

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalekind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions