brijrajk opened a new pull request, #12158: URL: https://github.com/apache/gluten/pull/12158
## What changes are proposed in this pull request? Five math scalar functions (`sin`, `tan`, `tanh`, `radians`, `ln`) are mapped in `ExpressionMappings.scala` to their Substrait counterparts but were missing from Gluten's Velox C++ function registry (`RegistrationAllFunctions.cc`). Queries using these functions silently fell back to vanilla Spark instead of running natively in Velox. This PR registers them in `registerFunctionOverwrite()` using the existing Velox prestosql implementations from `velox/functions/prestosql/Arithmetic.h`, which match Spark's expected semantics for these functions. Also fixes a leftover from PR #11756 (RAS removal): `MathFunctionsValidateSuite` and `ScalarFunctionsValidateSuite` were left as `abstract class` after their only concrete subclasses were deleted, causing all tests in those suites to silently not run. Both are promoted to `class` here, consistent with the fix already applied to `DateFunctionsValidateSuite` in that same PR. Fixes #12157 ## How was this patch tested? Added tests in `MathFunctionsValidateSuite` for each of the five functions using `runQueryAndCompare` with `checkGlutenPlan[ProjectExecTransformer]` to verify native execution in Velox without fallback. `MathFunctionsValidateSuite` now explicitly disables ANSI mode (enabled by default in Spark 4), which wraps arithmetic expressions in ANSI check nodes and shifts the top-level plan node away from `ProjectExecTransformer`. ANSI-specific behavior is covered by the existing `MathFunctionsValidateSuiteAnsiOn`. ## Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude (Anthropic) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
