fallintoplace opened a new pull request, #1162: URL: https://github.com/apache/arrow-go/pull/1162
### Rationale for this change NewDecimalType only checks maximum precision with debug assertions and does not reject zero precision. Normal builds can therefore create invalid decimal types. ### What changes are included in this PR? Validate that precision is between 1 and the maximum supported by the requested decimal type, and return arrow.ErrInvalid otherwise. ### Are these changes tested? Yes. The tests cover the lower and upper valid boundaries plus zero and overflow precision for all four decimal widths. The full arrow package suite passes. ### Are there any user-facing changes? NewDecimalType now returns an error for invalid precision instead of constructing an invalid type. -- 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]
