viirya commented on issue #2362: URL: https://github.com/apache/arrow-rs/issues/2362#issuecomment-1208690415
> Here the problem is that we may do redundant validation. For unsafe paths, I think we always do validation, no? Not sure if we can remove validation on unsafe paths. That is why they are "unsafe". > > That's the concern. `safe` means soundness. However `DataType::Decimal(usize, usize)` is unsound because it allows you to do `False` things without compile (or runtime) error. For example `Decimal(10000000000, 10000000000)` is invalid but you can do this. I think that you can also do similar thing with safe paths, not only for this decimal type constructor. As we don't validate (not just for decimal arrays) values in safe paths, you can put some unreasonable input there and cause unexpected result. As it is safe paths, I think that the responsibility is on users hands. -- 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]
