Admaing opened a new pull request, #30263: URL: https://github.com/apache/flink/pull/30263
## What is the purpose of the change Fixes [FLINK-41787](https://issues.apache.org/jira/browse/FLINK-41787). `ATAN2` failed during planning when exactly one argument was a `DECIMAL`. `FunctionGenerator` only registered `(DOUBLE, DOUBLE)` and `(DECIMAL, DECIMAL)`, so mixed calls such as `ATAN2(INT, DECIMAL)` or `ATAN2(DECIMAL, DOUBLE)` raised `CodeGenException: Unsupported call`. ## Brief change log - Add runtime overloads for `(DOUBLE, DECIMAL)` and `(DECIMAL, DOUBLE)` in `SqlFunctionUtils`. - Register both mixed argument pairs in `FunctionGenerator`. - Extend `MathFunctionsITCase` with the two failing SQL forms through the Table API and SQL. ## Verifying this change This change added tests and can be verified as follows: - Before the fix, the new mixed-type cases failed with `Unsupported call: ATAN2(INT NOT NULL, DECIMAL(2, 1) NOT NULL)` and the reverse argument order. - After the fix, `MathFunctionsITCase` passes: 83 tests, 0 failures, 0 errors. - `./mvnw -pl flink-table/flink-table-runtime,flink-table/flink-table-planner spotless:check checkstyle:check -T1C` passes with 0 Checkstyle violations. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: no - The runtime per-record code paths (performance sensitive): no existing working path changes; the previously failing mixed `DECIMAL` calls now use type-specific overloads - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes (please specify the tool below) Generated-by: Codex CLI 0.169.0-alpha.11.1 -- 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]
