himadripal commented on code in PR #7177:
URL: https://github.com/apache/arrow-rs/pull/7177#discussion_r1972383357
##########
arrow-cast/src/cast/mod.rs:
##########
@@ -8416,92 +8417,92 @@ mod tests {
fn test_parse_string_to_decimal() {
assert_eq!(
Decimal128Type::format_decimal(
- parse_string_to_decimal_native::<Decimal128Type>("123.45",
2).unwrap(),
+ parse_decimal::<Decimal128Type>("123.45", 38, 2).unwrap(),
Review Comment:
Idea is to move parse_string_to_decimal_native to use parse_decimal because
that has support for e-notation and are also being used in other places like
reader (i.e
[arrow-csv](https://github.com/apache/arrow-rs/blob/a00f9f43a0530b9255e4f9940e43121deedb0cc7/arrow-csv/src/reader/mod.rs#L657),
[arrow-json](https://github.com/apache/arrow-rs/blob/a00f9f43a0530b9255e4f9940e43121deedb0cc7/arrow-json/src/reader/decimal_array.rs#L51).
Also more comments
[here](https://github.com/apache/datafusion/issues/10315#issuecomment-2552112849)
for moving to parse_decimal
--
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]