JunRuiLee commented on code in PR #7948:
URL: https://github.com/apache/paimon/pull/7948#discussion_r3295887779
##########
paimon-api/src/main/java/org/apache/paimon/CoreOptions.java:
##########
@@ -3649,7 +3660,10 @@ public boolean forceLookup() {
Review Comment:
Good call, added `deletionVectorsMergeOnRead()` and updated both callers.
##########
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:
Makes sense. Added a check in the general validation section so it fails
early with a clear message. Also added a test for this case.
##########
paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/DeletionVectorITCase.java:
##########
@@ -206,6 +206,38 @@ public void testBatchReadDVTable(String changelogProducer,
boolean dvBitmap64) {
Row.of(1, "111111111"), Row.of(2, "2_1"), Row.of(3,
"3_1"), Row.of(4, "4"));
}
+ @ParameterizedTest
+ @MethodSource("parameters1")
+ public void testBatchReadDVTableWithMergeOnRead(String changelogProducer,
boolean dvBitmap64) {
+ sql(
+ String.format(
+ "CREATE TABLE T (id INT PRIMARY KEY NOT ENFORCED, name
STRING) "
+ + "WITH ('deletion-vectors.enabled' = 'true',
'changelog-producer' = '%s', "
+ + "'deletion-vectors.bitmap64' = '%s',
'write-only' = 'true')",
+ changelogProducer, dvBitmap64));
+
+ sql("INSERT INTO T VALUES (1, '111111111'), (2, '2'), (3, '3'), (4,
'4')");
+
+ sql("INSERT INTO T VALUES (2, '2_1'), (3, '3_1')");
+
Review Comment:
Fixed — added `'bucket' = '1'` to align with the core test, and changed the
assertion to `isEmpty()` for consistency.
--
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]