Repository navigation
Commit 91d7da6
authored
[opt](iceberg) support create branch/tag for iceberg (#51727)
### What problem does this PR solve?
Related Issue: #48285
Problem Summary:
You can now create Iceberg branches and tags through Doris.
```sql
-- branch
alter table tb1 create branch b1;
alter table tb1 create branch if not exists b1;
alter table tb1 create or replace branch b1;
alter table tb1 create or replace branch b1 AS OF VERSION <version>;
alter table tb1 create or replace branch b1 AS OF VERSION <version> RETAIN 1 HOURS;
-- CREATE b1 at snapshot 1234, retain b1 for 30 days, and retain the latest 30 days. The latest 3 snapshot snapshots, and 2 days worth of snapshots.
alter table tb1 CREATE BRANCH b1 AS OF VERSION 1234 RETAIN 30 DAYS WITH SNAPSHOT RETENTION 3 SNAPSHOTS 2 DAYS;
-- tag
alter table tb1 create tag t1;
alter table tb1 create tag if not eists t1;
alter table tb1 create or replace tag t1;
alter table tb1 create or replace tag t1 AS OF VERSION <version>;
-- CREATE t1 at snapshot 1234 and retain it for 1 year.
alter table tb1 create tag t1 AS OF VERSION 1234 RETAIN 365 DAYS
```
The supported time units include: DAYS, HOURS, MINUTES1 parent e9937a7 commit 91d7da6
30 files changed
Lines changed: 2092 additions & 4 deletions
File tree
- docker/thirdparties
- docker-compose/iceberg/scripts/create_preinstalled_scripts/iceberg
- fe/fe-core/src
- main
- antlr4/org/apache/doris/nereids
- java/org/apache/doris
- alter
- analysis
- datasource
- hive
- iceberg
- operations
- journal
- nereids
- parser
- trees/plans/commands
- info
- persist
- test/java/org/apache/doris
- datasource/iceberg
- nereids/trees/plans/commands/info
- regression-test
- data/external_table_p0/iceberg
- suites/external_table_p0/iceberg
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | | - | |
| 742 | + | |
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
| |||
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
| 286 | + | |
284 | 287 | | |
285 | 288 | | |
286 | 289 | | |
| |||
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
| 365 | + | |
362 | 366 | | |
363 | 367 | | |
364 | 368 | | |
| |||
454 | 458 | | |
455 | 459 | | |
456 | 460 | | |
| 461 | + | |
| 462 | + | |
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
| |||
487 | 493 | | |
488 | 494 | | |
489 | 495 | | |
| 496 | + | |
490 | 497 | | |
491 | 498 | | |
492 | 499 | | |
| |||
513 | 520 | | |
514 | 521 | | |
515 | 522 | | |
| 523 | + | |
516 | 524 | | |
517 | 525 | | |
518 | 526 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
725 | 763 | | |
726 | 764 | | |
727 | 765 | | |
| |||
1785 | 1823 | | |
1786 | 1824 | | |
1787 | 1825 | | |
| 1826 | + | |
1788 | 1827 | | |
1789 | 1828 | | |
1790 | 1829 | | |
| |||
1839 | 1878 | | |
1840 | 1879 | | |
1841 | 1880 | | |
| 1881 | + | |
1842 | 1882 | | |
1843 | 1883 | | |
1844 | 1884 | | |
| |||
1896 | 1936 | | |
1897 | 1937 | | |
1898 | 1938 | | |
| 1939 | + | |
1899 | 1940 | | |
1900 | 1941 | | |
1901 | 1942 | | |
| |||
1945 | 1986 | | |
1946 | 1987 | | |
1947 | 1988 | | |
| 1989 | + | |
1948 | 1990 | | |
1949 | 1991 | | |
1950 | 1992 | | |
| |||
2011 | 2053 | | |
2012 | 2054 | | |
2013 | 2055 | | |
| 2056 | + | |
| 2057 | + | |
2014 | 2058 | | |
2015 | 2059 | | |
2016 | 2060 | | |
| |||
2031 | 2075 | | |
2032 | 2076 | | |
2033 | 2077 | | |
| 2078 | + | |
2034 | 2079 | | |
2035 | 2080 | | |
2036 | 2081 | | |
| |||
2048 | 2093 | | |
2049 | 2094 | | |
2050 | 2095 | | |
| 2096 | + | |
2051 | 2097 | | |
2052 | 2098 | | |
2053 | 2099 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
381 | 403 | | |
382 | 404 | | |
383 | 405 | | |
| |||
673 | 695 | | |
674 | 696 | | |
675 | 697 | | |
676 | | - | |
| 698 | + | |
677 | 699 | | |
678 | 700 | | |
679 | 701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
223 | 240 | | |
0 commit comments