JunRuiLee opened a new pull request, #7882:
URL: https://github.com/apache/paimon/pull/7882
### Purpose
This PR is the first part of #7863, focusing on the core APIs,
implementation, and REST support for branch merge.
It adds `mergeBranch`, which incrementally adds data files that exist only
in the source branch to the target branch, without replacing either branch.
Correctness is guarded by the immutable table option `'branch-merge.enabled' =
'true'`, which enforces the pure-append invariant required by file-level branch
merge: compaction and `INSERT OVERWRITE` are rejected, and deletion vectors are
not supported.
### Tests
Added core tests:
- `AppendOnlySimpleTableTest#testMergeBranch`
- `AppendOnlySimpleTableTest#testMergeBranchMultipleTimes`
- `AppendOnlySimpleTableTest#testMergeBranchFailsOnStaleDuplicateCommit`
- `AppendOnlySimpleTableTest#testMergeBranchBidirectional`
- `AppendOnlySimpleTableTest#testMergeBranchEmptyDiff`
- `AppendOnlySimpleTableTest#testMergeBranchSchemaConflict`
- `AppendOnlySimpleTableTest#testMergeBranchSchemaHistoryConflict`
- `AppendOnlySimpleTableTest#testMergeBranchRowTrackingTable`
- `AppendOnlySimpleTableTest#testMergeBranchRowTrackingMultipleTimes`
- `AppendOnlySimpleTableTest#testMergeBranchRowTrackingAfterTargetWrites`
-
`AppendOnlySimpleTableTest#testMergeBranchRowTrackingBetweenNonMainBranches`
- `AppendOnlySimpleTableTest#testMergeBranchRowTrackingMismatch`
- `AppendOnlySimpleTableTest#testMergeBranchRowTrackingStaleMerge`
- `AppendOnlySimpleTableTest#testMergeBranchSameBranch`
- `AppendOnlySimpleTableTest#testMergeBranchSamePartition`
- `AppendOnlySimpleTableTest#testMergeBranchNonExistentBranch`
- `AppendOnlySimpleTableTest#testMergeBranchMultiBucket`
- `AppendOnlySimpleTableTest#testMergeBranchNonExistentTargetBranch`
- `AppendOnlySimpleTableTest#testMergeBranchBetweenNonMainBranches`
- `AppendOnlySimpleTableTest#testMergeBranchWithoutBranchMergeEnabled`
- `AppendOnlySimpleTableTest#testMergeBranchAfterSnapshotExpiration`
- `AppendOnlySimpleTableTest#testBranchMergeEnabledRejectsOverwrite`
- `PrimaryKeySimpleTableTest#testMergeBranchPrimaryKeyTable`
Added REST tests:
- `RESTCatalogTest#testMergeBranch`
- branch-not-exist coverage in `RESTCatalogTest#testBranches`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]