abp002 opened a new pull request, #26382: URL: https://github.com/apache/datafusion/pull/26382
## Which issue does this PR close? - Closes #26334. ## Rationale for this change `datafusion-spark` returns `1` for `pow(1, NaN)` and `pow(±1, ±Infinity)` where Spark returns NaN, and `Infinity` for `pow(-0.0, -1.0)` where Spark returns `-Infinity`. ## What changes are included in this PR? The special case for a zero base is removed, since `powf` already gives `Infinity` for `0.0` and `-Infinity` for `-0.0` with a negative odd exponent. A NaN exponent, or a base of `1` or `-1` with an infinite exponent, now returns NaN. ## What is the testing strategy for this PR? New and updated cases in `spark/math/pow.slt`, for both the scalar and the array path. ## Are there any user-facing changes? `pow` and `power` return NaN or `-Infinity` in these cases, as Spark does. -- 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]
