neilconway opened a new pull request, #22575: URL: https://github.com/apache/datafusion/pull/22575
## Which issue does this PR close? - Closes #22567 ## Rationale for this change `nanvl`'s function signature listed `Float16` first, which meant that data types not natively supported by the function (e.g., integers) would be converted to `Float16`. This resulted in unnecessary and incorrect rounding for large integer inputs (e.g., `nanvl(16777217, 1)` returned incorrect results). Instead, we now convert non-floating point inputs to Float64. This might still round for inputs larger than 2^53, but it's the best we can do without more fundamental changes. Floating point inputs are coerced to the widest float type they have in common -- e.g., (Float16, Float32) -> Float32. ## What changes are included in this PR? * Change function signature to avoid unnecessary rounding * Update SLT ## Are these changes tested? Yes; new tests added. ## Are there any user-facing changes? Yes; `nanvl` now avoids rounding in more cases. -- 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]
