luis4a0 commented on code in PR #13282: URL: https://github.com/apache/gluten/pull/13282#discussion_r4269742665
########## docs/velox-backend-scalar-function-support.md: ########## @@ -297,7 +297,7 @@ The status applies to `spark.sql.ansi.enabled=false`. When ANSI mode is enabled, | randn | Randn | S | | | random | Rand | S | | | rint | Rint | S | | -| round | Round | S | | +| round | Round | PS | Integral scales in [0, 400] and NULL use upstream Velox. NULL scales skip child evaluation. Negative and unqualified extreme integral scales retain Spark's captured ANSI behavior. | Review Comment: Reworded the support entry to explicitly list negative scales, scales outside `[0, 400]`, and scales not folded to INTEGER literals as Spark fallbacks. The typed-NULL native path remains explicit. Commit: https://github.com/apache/gluten/commit/c8cef1c47c048aaa312bbe8786f75db41e01de9e ########## cpp/velox/operators/functions/overlay/RegisterFunctionOverlay.cc: ########## @@ -25,14 +25,10 @@ using namespace facebook; namespace gluten { namespace { -// Spark's round differs from Velox's in the handling of negative decimals and -// floating point rounding semantics. +// Keep only the floating-point overlay; integral ROUND uses Velox's session ANSI handling. void registerRoundFunction() { - velox::functions::registerUnaryNumeric<RoundFunction>({"round"}); - velox::registerFunction<RoundFunction, int8_t, int8_t, int32_t>({"round"}); - velox::registerFunction<RoundFunction, int16_t, int16_t, int32_t>({"round"}); - velox::registerFunction<RoundFunction, int32_t, int32_t, int32_t>({"round"}); - velox::registerFunction<RoundFunction, int64_t, int64_t, int32_t>({"round"}); + velox::registerFunction<RoundFunction, double, double>({"round"}); + velox::registerFunction<RoundFunction, float, float>({"round"}); velox::registerFunction<RoundFunction, double, double, int32_t>({"round"}); velox::registerFunction<RoundFunction, float, float, int32_t>({"round"}); } Review Comment: Tightened the comment to describe registration only: upstream integral registrations are left intact, SQL eligibility is controlled by validation, and only the floating overlay is retained here. Commit: https://github.com/apache/gluten/commit/c8cef1c47c048aaa312bbe8786f75db41e01de9e -- 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]
