neilconway opened a new issue, #10793:
URL: https://github.com/apache/arrow-rs/issues/10793
### Describe the bug
This is inconsistent with how whitespace is handling when parsing floats, as
well as the behavior when casting utf8 -> decimal.
### To Reproduce
```rust
use arrow_array::types::{Decimal128Type, Float64Type};
use arrow_array::{ArrayRef, StringArray, cast::AsArray};
use arrow_cast::parse::{Parser, parse_decimal};
use arrow_cast::cast;
use arrow_schema::DataType;
use std::sync::Arc;
assert_eq!(Float64Type::parse(" 1.5"), Some(1.5));
let strings: ArrayRef = Arc::new(StringArray::from(vec![" 1.5"]));
let decimals = cast(&strings, &DataType::Decimal128(10, 1)).unwrap();
assert_eq!(decimals.as_primitive::<Decimal128Type>().value(0), 15); // 1.5
parse_decimal::<Decimal128Type>(" 1.5", 10, 1); // Err: can't parse the
string value 1.5 to decimal
```
### Expected behavior
_No response_
### Additional context
_No response_
--
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]