mgaido91 commented on issue #25136: [SPARK-28322][SQL] Add support to Decimal 
type for integral divide
URL: https://github.com/apache/spark/pull/25136#issuecomment-522582679
 
 
   thank for clarifying @cloud-fan, now I get your point. So let me explain a 
bit better:
   
    - `div` performs integral division, ie. it returns the integer part of a 
division. This is true for all the data types which are passes as operands. So 
it is not an alias for `/` it is a different operation with a different result;
    - currently in Spark we do not support DECIMAL operands for it (before this 
PR. So basically, in order to get the equivalent operation, a user needs to 
cast the operands to DOUBLE and then perform div on them. After this PR, these 
2 casts for the operands are not needed anymore and the same operation is 
available also for DECIMALs.
   
   Does this answer? Thanks.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to