viirya commented on code in PR #2360:
URL: https://github.com/apache/arrow-rs/pull/2360#discussion_r943962006
##########
arrow/src/datatypes/datatype.rs:
##########
@@ -479,57 +1015,38 @@ pub(crate) fn validate_decimal_precision(value: i128,
precision: usize) -> Resul
}
}
-/// Validates that the specified string value can be properly
-/// interpreted as a Decimal256 number with precision `precision`
+/// Validates that the specified `byte_array` of little-endian format
+/// value can be properly interpreted as a Decimal256 number with precision
`precision`
#[inline]
-pub(crate) fn validate_decimal256_precision(
- value: &BigInt,
+pub(crate) fn validate_decimal256_precision_with_lt_bytes(
+ lt_value: &[u8],
precision: usize,
-) -> Result<&BigInt> {
+) -> Result<()> {
if precision > DECIMAL256_MAX_PRECISION {
return Err(ArrowError::InvalidArgumentError(format!(
- "Max precision of a Decimal256 is {}, but got {}",
+ "Max precision of a Decima256 is {}, but got {}",
Review Comment:
Original is correct, why change it?
```suggestion
"Max precision of a Decimal256 is {}, but got {}",
```
--
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]