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


##########
paimon-python/pypaimon/schema/schema_manager.py:
##########
@@ -166,6 +166,70 @@ def _assert_not_renaming_blob_column(
             )
 
 
+def _validate_blob_fields(fields: List[DataField], options: dict, 
primary_keys: List[str]):
+    """Validate blob field configurations in the schema."""
+    if options is None:
+        options = {}
+
+    blob_field_names = {
+        field.name for field in fields if 'blob' in str(field.type).lower()

Review Comment:
   [P2] This detects BLOB columns by substring-matching the rendered type, 
which is broader than Java's `field.type().getTypeRoot() == DataTypeRoot.BLOB`. 
A normal top-level ROW column whose nested field is named or typed with `blob` 
will now be treated as a top-level BLOB column, so create-table validation 
starts requiring `row-tracking.enabled` and `data-evolution.enabled` even 
though Java would not. For example `payload ROW<blob_name STRING>` renders with 
`blob` in the type string and becomes part of `blob_field_names`. Please check 
only top-level BLOB types here (for example `getattr(field.type, 'type', None) 
== 'BLOB'` or an `AtomicType`/type-root helper) and add a regression test for 
nested fields containing the word `blob`.



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