haruki-830 opened a new pull request, #4503: URL: https://github.com/apache/flink-cdc/pull/4503
#### Summary This commit fixes DECIMAL precision truncation in YAML Transform by adding an explicit decimal precision mode. The default `UP_TO_19` mode preserves existing Calcite behavior, while the opt-in `UP_TO_38` mode supports the maximum DECIMAL precision provided by Flink CDC. #### Key Changes 1. Configurable DECIMAL Precision - Added the `transform.decimal.precision.mode` pipeline option. - Added `UP_TO_19` as the default value to preserve backward compatibility. - Added `UP_TO_38` as an opt-in mode to support DECIMAL precision and scale up to 38. - Propagated the configured mode through the composer and Transform runtime. 2. DECIMAL Type Inference and Conversion - Added a Calcite type system that selects the maximum numeric precision and scale based on the configured mode. - Applied the selected type system consistently to projection and filter expression type inference. - Updated runtime DECIMAL conversion to follow the precision and scale of the inferred target type. - Prevented valid results whose required precision exceeds 19 from being truncated or converted to `NULL` in `UP_TO_38` mode. 3. Test Coverage and Documentation - Added unit tests for DECIMAL type inference and runtime value conversion. - Added YAML Transform specs covering DECIMAL arithmetic and casts under both precision modes. - Added integration coverage for values requiring precision greater than 19. - Documented the new option in both English and Chinese. #### JIRA Reference [https://issues.apache.org/jira/browse/FLINK-40360](https://issues.apache.org/jira/browse/FLINK-40360) -- 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]
