Mao Jiayi created FLINK-40204:
---------------------------------
Summary: Introduce statement-level codegen for YAML Transform
expressions
Key: FLINK-40204
URL: https://issues.apache.org/jira/browse/FLINK-40204
Project: Flink
Issue Type: Improvement
Components: Flink CDC
Reporter: Mao Jiayi
CDC YAML Transform currently compiles transform expressions through
expression-level Janino code generation. Nullable AND / OR short-circuit
evaluation is currently preserved by using a lazy Supplier fallback when the
left operand is nullable.
This preserves correctness, but the nullable-left path may create a Supplier
during per-record evaluation. The JVM may optimize this through JIT escape
analysis, but the current expression-level codegen does not avoid the
allocation explicitly.
To address this more fundamentally, Transform expression codegen should support
statement-level generation. A GeneratedExpression-like intermediate
representation can carry generated statements, result variables, and result
types, allowing nullable short-circuit logic to be expressed with explicit if /
else blocks instead of Supplier wrappers.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)