shifluxxc opened a new pull request, #19409: URL: https://github.com/apache/datafusion/pull/19409
## Which issue does this PR close? * Part of #19250 ## Rationale for this change This PR enables support for the `power()` function with negative scale decimals (e.g., `1e4` represented as `1` with scale `-4`) and log for decimal32 decimal64 . ## What changes are included in this PR? - **Updated `pow_decimal_int` logic:** Added support for negative scaling factors. When the adjustment factor is negative, the function now multiplies by instead of dividing. - For decimals with negative scale, the value is first converted to f64 to compute the logarithm. ## Are these changes tested? Yes. * Verified locally using `sqllogictest`. * Covers cases such as `SELECT power(1e4, 2)` which previously returned a "Negative scale is not supported" error. -- 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]
