Stephen0421 commented on code in PR #8928:
URL: https://github.com/apache/paimon/pull/8928#discussion_r3705269923


##########
paimon-core/src/main/java/org/apache/paimon/schema/SchemaValidation.java:
##########
@@ -1427,6 +1428,36 @@ private static void validatePrimaryKeyBlobConfiguration(
             return;
         }
 
+        checkArgument(
+                options.mergeEngine() == MergeEngine.DEDUPLICATE
+                        || options.mergeEngine() == MergeEngine.PARTIAL_UPDATE,
+                "Primary-key managed BLOB tables only support the deduplicate 
or "
+                        + "partial-update merge engine.");
+        checkArgument(
+                options.changelogProducer() == ChangelogProducer.NONE,
+                "Primary-key managed BLOB tables only support 
changelog-producer 'none'.");
+        checkArgument(
+                options.dataFileExternalPaths() == null,
+                "Primary-key managed BLOB tables do not support '%s'.",
+                CoreOptions.DATA_FILE_EXTERNAL_PATHS.key());
+        checkArgument(
+                !options.pkClusteringOverride(),
+                "Primary-key managed BLOB tables do not support '%s'.",
+                CoreOptions.PK_CLUSTERING_OVERRIDE.key());
+    }
+
+    private static void validatePrimaryKeyBlobKeyConfiguration(
+            TableSchema schema, CoreOptions options) {
+        if (schema.primaryKeys().isEmpty()) {
+            return;
+        }
+
+        Set<String> managedBlobFields =

Review Comment:
   Thanks, fixed. Schema validation now parses the key portion of every 
partial-update `fields.<key[,key...]>.sequence-group` option and recursively 
rejects ordering fields containing `BLOB`, including `ARRAY<BLOB>` and `MAP<K, 
BLOB>`.
   
   BLOB fields on the protected-value side remain supported. The parser is 
shared with `PartialUpdateMergeFunction.Factory` to keep schema validation and 
runtime behavior consistent.
   
   I also added tests for scalar, ARRAY, MAP, multi-key ordering fields, 
allowed BLOB protected fields, malformed sequence-group options, and 
compatibility with non-partial-update merge engines.



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