theirix commented on PR #22651:
URL: https://github.com/apache/datafusion/pull/22651#issuecomment-4584845335

   Thanks for the PR, @neilconway . I had similar reflections on `power` 
recently, and this change would make sense.
   
   Since `power` and `log` can change scale drastically, fixed-size decimal 
types are tricky to implement correctly without having an infinite intermediate 
representation like `BigInt` or Postgres-style infinite decimal. An ideal 
behaviour for me is determining whether it makes sense to return decimal values 
based on the arguments and scale, but it essentially shifts computation to the 
planning phase and doesn't work well with arrays (you can have small and large 
scales in the same array, but the return type has to stay the same).
   
   Nevertheless, other scale-preserving functions like `round`, `abs`, `gcd`, 
etc still benefit from a decimal implementation since they carry the same type 
across operations.


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