Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support Iceberg branch/tag #48285

Open
2 of 7 tasks
wuwenchi opened this issue Feb 25, 2025 · 0 comments
Open
2 of 7 tasks

[Feature] Support Iceberg branch/tag #48285

wuwenchi opened this issue Feb 25, 2025 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@wuwenchi
Copy link
Contributor

wuwenchi commented Feb 25, 2025

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");

-- 'branch_' is the fix prefix
SELECT * FROM [catalog.][db.]table VERSION AS OF 'branch_test_branch';

SELECT * FROM [catalog.][db.]table@branch("test_branch");

-- 'tag_' is the fix prefix
SELECT * FROM [catalog.][db.]table VERSION AS OF 'tag_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
ALTER TABLE [catalog.][db.]table
CREATE TAG tag_name AS OF VERSION version
[RETAIN num DAYS];

ALTER TABLE [catalog.][db.]table
CREATE BRANCH branch_name
[AS OF VERSION version]
[RETAIN num DAYS]
[WITH SNAPSHOT RETENTION num SNAPSHOTS];
  • branch/tag drop, like
ALTER TABLE [catalog.][db.]table DROP BRANCH branch_name;
ALTER TABLE [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

@wuwenchi wuwenchi added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant