theirix opened a new pull request, #19874:
URL: https://github.com/apache/datafusion/pull/19874

   ## Which issue does this PR close?
   
   - Closes #19621.
   
   ## Rationale for this change
   
   A helper `calculate_binary_math and` UDFs relying on it could behave 
strangely if the scales of inputs and outputs are different. Original logic 
didn't fully handle it.
   
   So let's introduce `calculate_binary_math_decimal` and 
`calculate_binary_math_numeric functions` with a proper handling of arguments 
of different scales and type casting for input and output arguments.
   
   They supersede `calculate_binary_math` and `calculate_binary_math_decimal` 
because they have a slightly different functor signature that automatically 
passes the effective precision and scale (even if rescaled). The rest is 
compatible.
   
   ## What changes are included in this PR?
   
   - New functions
   - Port existing UDFs to new functions
   
   ## Are these changes tested?
   
   - Existing unit tests
   - SLTs
   
   ## Are there any user-facing changes?
   
   Older functions could be deprecated. Since they are a part of the public 
interface of datafusion-functions, I just placed a comment without a 
full-fledged `deprecate` macro. Up to discussion whether it should be used


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