viirya commented on PR #3690:
URL: https://github.com/apache/arrow-rs/pull/3690#issuecomment-1457056527

   > > So the final result will be adjusted to same precision/scale again
   > 
   > But I thought we just established that the values don't fit into the 
original precision / scale? I'm sorry but I'm really confused...
   
   Not sure I get it correctly. But the adjustment is to make sure all values 
have same precision/scale if possible. e.g, for the above one:
   
   ```
   1: {value: 0, scale: 0, precision: 3},
   2: {value: 1, scale: 2, precision: 3},
   3: {value: 100, scale: 2, precision: 3},
   ```
   
   The precision/scale can be inconsistent due to truncating per value. The 
followup expression will adjust them to same precision/scale (depending on the 
arithmetic op, decided by Spark type coercion rule). If value cannot be fit 
into it, it could be null or runtime exception, depending on config.


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

Reply via email to