JingsongLi commented on code in PR #7948:
URL: https://github.com/apache/paimon/pull/7948#discussion_r3295841733


##########
paimon-core/src/main/java/org/apache/paimon/schema/SchemaValidation.java:
##########
@@ -620,6 +620,13 @@ private static void validateForDeletionVectors(CoreOptions 
options) {
                     !options.mergeEngine().equals(MergeEngine.FIRST_ROW),
                     "First row merge engine does not need deletion vectors 
because there is no deletion of old data in this merge engine.");
         }
+
+        checkArgument(
+                
!(options.toConfiguration().get(CoreOptions.DELETION_VECTORS_MERGE_ON_READ)
+                        && options.visibilityCallbackEnabled()),

Review Comment:
   **Consider validating `merge-on-read` requires DV enabled**
   
   `validateForDeletionVectors` is only called when `deletionVectorsEnabled()` 
is true. If a user sets `deletion-vectors.merge-on-read=true` without 
`deletion-vectors.enabled=true`, the option is silently ignored. This could be 
a confusing misconfiguration.
   
   Consider adding a check (either here or in the general validation section):
   
   ```java
   checkArgument(
           
!(options.toConfiguration().get(CoreOptions.DELETION_VECTORS_MERGE_ON_READ)
                   && !options.deletionVectorsEnabled()),
           "deletion-vectors.merge-on-read requires deletion-vectors.enabled to 
be true.");
   ```



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