haruki-830 opened a new pull request, #4474:
URL: https://github.com/apache/flink-cdc/pull/4474

   ### Summary
   This commit aligns YAML Transform row-level predicate semantics with Flink 
SQL. Predicates now preserve SQL `UNKNOWN` as Java `Boolean null`, filters only 
pass `TRUE`, and SQL pattern matching no longer relies on Java regex behavior.
   
   ### Key Changes
   **SQL Three-Valued Logic**  
   
   - Updated comparison predicates to return `UNKNOWN` when operands contain 
`NULL`.  
   - Covers `=`, `<>`, `<`, `<=`, `>`, `>=`.  
   - Added SQL-compatible `AND`, `OR`, and `NOT` handling for `Boolean null`.
   
   **BETWEEN and IN Semantics**  
   
   - Updated `BETWEEN` / `NOT BETWEEN` to preserve `UNKNOWN` according to SQL 
logic.  
   - Updated `IN` / `NOT IN` so `NULL` operands or candidates produce 
SQL-compatible results.
   
   **LIKE and SIMILAR TO Semantics**  
   
   - Updated `LIKE` / `NOT LIKE` to use SQL wildcard semantics.  
   - Supports `%`, `_`, and `LIKE ... ESCAPE`.  
   - Added support for `SIMILAR TO` / `NOT SIMILAR TO`.  
   - Returns `UNKNOWN` when relevant arguments are `NULL`.
   
   **Additional Predicate Support**  
   
   - Added support for `IS UNKNOWN` / `IS NOT UNKNOWN`.  
   - Added support for `IS DISTINCT FROM` / `IS NOT DISTINCT FROM`.  
   - Kept boolean condition consumers null-safe so `UNKNOWN` does not cause 
Java unboxing failures.
   
   **Test Coverage**  
   
   - Added unit tests for comparison and string predicate functions.  
   - Updated parser tests for generated Janino expressions.  
   - Updated YAML transform specs for NULL, LIKE, ESCAPE, SIMILAR TO, and 
distinct/unknown predicates.
   
   **JIRA Reference**  
   
[https://issues.apache.org/jira/browse/FLINK-40151](https://issues.apache.org/jira/browse/FLINK-40151)


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