plusplusjiajia opened a new pull request, #9212:
URL: https://github.com/apache/paimon/pull/9212

   ### Purpose
     `SubstringTransform` and `TrimTransform` are not listed in `Transform`'s 
`@JsonSubTypes`, so Jackson writes the class simple name as the type id and 
reading it back fails with `InvalidTypeIdException`. Both are therefore 
unusable for column masking, where a rule is stored as JSON and replayed later 
— the only usable masks today are `NULL` and `CONCAT` of a constant, so keeping 
the last four characters of a value cannot be expressed.
   
     Registering them needs three more things:
   
     * `SubstringTransform` had no Jackson annotations, so its inputs were 
dropped. It gets a `@JsonCreator` and a deserializer extending 
`StringTransform`'s with a number branch, since its positions may be integers.
     * `TrimTransform`'s `trimFlag` was not serialized, and `name()` returns 
`TRIM` for all three flags, so `LTRIM`/`RTRIM` would silently degrade into 
`TRIM`. It becomes its own property, and part of `equals`/`hashCode`.
     * pypaimon executes the same rules and raised `Unknown transform type` for 
both. It gains them, following the Java semantics rather than the nearest Arrow 
kernel — a one-input `TRIM` trims spaces only, and its character argument is a 
set.
   


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