JunRuiLee commented on code in PR #7882:
URL: https://github.com/apache/paimon/pull/7882#discussion_r3265773815


##########
paimon-api/src/main/java/org/apache/paimon/CoreOptions.java:
##########
@@ -2215,6 +2215,17 @@ public InlineElement getDescription() {
                     .defaultValue(false)
                     .withDescription("Whether enable data evolution for row 
tracking table.");
 
+    @Immutable
+    public static final ConfigOption<Boolean> BRANCH_MERGE_ENABLED =
+            key("branch-merge.enabled")

Review Comment:
    Thanks for the review. I added this option mainly to keep a clear invariant 
for branch merge: the table history must be pure-append.
   
   My concern is that checking this only when mergeBranch is called may not be 
reliable, because old snapshots can expire. In that case, we may no longer be 
able to tell whether compaction or INSERT OVERWRITE happened before, and 
file-level merge could become unsafe.
   
   So the option is intended to make this an explicit opt-in behavior and keep 
the table merge-safe from the beginning by rejecting compaction / INSERT 
OVERWRITE.
   
   Another possible approach could be to persist some state indicating whether 
unsafe operations have ever happened, but that seems a bit heavier to me. 
   
   Please let me know what you think.



-- 
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]

Reply via email to