viirya commented on issue #2362:
URL: https://github.com/apache/arrow-rs/issues/2362#issuecomment-1208728543

   I agree that the current decimal types constructors have the mentioned 
issue. It can be used to construct invalid decimal types.
   
   My point above is, we have certain checks for it during performing value 
validation, in the places we want to make sure the data is valid (safe paths, 😄 
). So it will be caught nowadays.
   
   For the unsafe paths, we have many ways to mess the inputs, not just with 
the type constructor. So I don't think it is an issue there. Users should know 
what they're doing with such APIs.
   
   The only holes, I guess, are where we don't do validation so invalid decimal 
type is not caught. But we also don't want to run real decimal value validation 
if we think it is computation heavy.
   
   Alternatively, we can do only precision check on such places, instead of 
full value validation.
   
   
   
   
   


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