alamb opened a new issue, #4424:
URL: https://github.com/apache/arrow-rs/issues/4424
**Describe the bug**
in version 41.0.0 an interval such as `.5 months` was parsed correctly
In version 42.0.0 (not yet released at the time of this writing) it fails
with an error: `NotYetImplemented("Unsupported Interval Expression with value
".5 months")`
**To Reproduce**
Try to parse `0.5`
Here is a unit test:
```diff
diff --git a/arrow-cast/src/parse.rs b/arrow-cast/src/parse.rs
index accce99b4..7984aeb9a 100644
--- a/arrow-cast/src/parse.rs
+++ b/arrow-cast/src/parse.rs
@@ -1798,6 +1798,16 @@ mod tests {
Interval::parse("-1.5 months -3.2 days", &config).unwrap(),
);
+ assert_eq!(
+ Interval::new(0i32, 15i32, 0),
+ Interval::parse("0.5 months", &config).unwrap(),
+ );
+
+ assert_eq!(
+ Interval::new(0i32, 15i32, 0),
+ Interval::parse(".5 months", &config).unwrap(),
+ );
+
assert_eq!(
Interval::new(2i32, 10i32, 9 * NANOS_PER_HOUR),
Interval::parse("2.1 months 7.25 days 3 hours",
&config).unwrap(),
```
The second case fails like this:
```
---- parse::tests::test_parse_interval stdout ----
thread 'parse::tests::test_parse_interval' panicked at 'called
`Result::unwrap()` on an `Err` value: NotYetImplemented("Unsupported Interval
Expression with value \".5 months\"")', arrow-cast/src/parse.rs:1808:51
stack backtrace:
```
**Expected behavior**
Both new cases should pass correctly
**Additional context**
Found while testing this upgrade in DataFusion
--
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]