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

   #### Summary
   
   This commit adds `TRY_CAST`, `IFNULL`, and `NULLIF` support to YAML 
Transform projections and filters. It aligns their behavior with Flink SQL 
while preserving the existing `CAST` failure semantics.
   
   #### Key Changes
   
   1. Function and Syntax Support
   - Added operator and type metadata for `TRY_CAST`, `IFNULL`, and `NULLIF`.
   - Added preprocessing for `TRY_CAST(expr AS type)` because Calcite 1.32 does 
not support this syntax directly.
   - Handles nested expressions, different letter cases, quoted text, 
identifiers, and SQL comments.
   
   2. Code Generation and Runtime Semantics
   - Added Janino code generation for all three functions.
   - `TRY_CAST` supports the same target types as the existing `CAST` 
implementation and returns `NULL` only for data conversion failures.
   - Unsupported conversion paths fail during pipeline validation, while 
invalid configuration, UDF, and internal errors continue to fail the task.
   - Added null-safe `IFNULL` and numeric-aware/deep-equality `NULLIF` 
evaluation without changing existing `CAST` behavior.
   
   3. Test Coverage and Documentation
   - Added parser, code generation, runtime, and YAML specification coverage 
for projections and filters.
   - Covered successful and failed casts, nested expressions, nullability, 
invalid syntax, and function combinations.
   - Verified the changes with both default Flink 1.20 and the Flink 2 profile.
   - Updated the English and Chinese Transform documentation.
   
   #### JIRA Reference
   
   
[https://issues.apache.org/jira/browse/FLINK-40240](https://issues.apache.org/jira/browse/FLINK-40240)


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