brijrajk opened a new issue, #12157:
URL: https://github.com/apache/gluten/issues/12157

   ### Description
   
   ## Summary
   
   Five math scalar functions — `sin`, `tan`, `tanh`, `radians`, and `ln` — are 
mapped in
   `ExpressionMappings.scala` (Spark expression → Substrait function name) but 
are not
   registered in Gluten's Velox C++ function registry 
(`RegistrationAllFunctions.cc`).
   
   As a result, queries using these functions silently fall back to vanilla 
Spark instead
   of executing natively in Velox.
   
   ## Root Cause
   
   `RegistrationAllFunctions.cc` does not call `velox::registerFunction<>` for:
   - `ln` → `velox::functions::LnFunction`
   - `radians` → `velox::functions::RadiansFunction`
   - `sin` → `velox::functions::SinFunction`
   - `tan` → `velox::functions::TanFunction`
   - `tanh` → `velox::functions::TanhFunction`
   
   All five implementations exist in Velox's prestosql arithmetic library
   (`velox/functions/prestosql/Arithmetic.h`).
   
   ## Fix
   
   Register the five functions in `registerFunctionOverwrite()` and add Scala 
integration
   tests in `MathFunctionsValidateSuite` to verify native execution.
   
   
   ### Gluten version
   
   main branch


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

Reply via email to