Stephen0421 commented on code in PR #10570:
URL: https://github.com/apache/paimon/pull/10570#discussion_r4321318904
##########
paimon-python/pypaimon/schema/schema_manager.py:
##########
@@ -349,6 +350,57 @@ def _assert_not_renaming_blob_column(
)
+def _effective_bucket_keys(options, primary_keys, partition_keys):
+ configured = (options or {}).get(CoreOptions.BUCKET_KEY.key())
+ if configured and str(configured).strip():
+ return [key.strip() for key in str(configured).split(',') if
key.strip()]
+ return [key for key in primary_keys if key not in partition_keys]
+
+
+def _validate_primary_key_managed_blobs(fields, options, primary_keys,
partition_keys):
+ """Match Java SchemaValidation for primary-key managed BLOB fields."""
+ from pypaimon.common.options.core_options import ChangelogProducer,
MergeEngine
+
+ core_options = CoreOptions(Options(options or {}))
+ inline = core_options.blob_descriptor_fields() |
core_options.blob_view_fields()
+ managed = managed_blob_field_names(fields, inline)
+ if not managed:
+ return
+
+ engine = core_options.merge_engine()
Review Comment:
Fixed in a56428242.
Validation now rejects BLOB sequence-group ordering fields, including
descriptor/view fields, and enforces the managed-BLOB aggregate/retract
restriction. It handles explicit and default aggregate functions, the
ignore-delete exemption, and Java-compatible `ignore-retract` boolean values.
These checks run before schema persistence for both table creation and
option changes. Python/Java accept/reject parity was verified for the reported
cases and valid alternatives.
--
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]