tshauck opened a new issue, #6198:
URL: https://github.com/apache/arrow-rs/issues/6198
**Describe the bug**
The second part of `add_month_day_nano` is seemingly ignored, so if you try
to add like an hour to a `Date64Type`, you actually get back the same date.
**To Reproduce**
This test will pass on main, but it shouldn't (added to
`arrow-array/src/types.rs`).
```rust
#[cfg(test)]
mod tests {
use super::*;
use arrow_data::{layout, BufferSpec};
#[test]
fn add_month_day_nano() {
let date_64 = Date64Type::default_value();
let interval = IntervalMonthDayNanoType::make_value(0, 0,
1_000_000_000 * 3600);
let result = Date64Type::add_month_day_nano(date_64, interval);
// date_64 is unchanged
assert_eq!(result, date_64);
}
}
```
**Expected behavior**
For date64s adding increments less than a day should be supported.
**Additional context**
I _think_ the result is from coercion to a NativeDate instead of a
NativeDateTime. I have a working branch, I'll open a PR for...
https://github.com/apache/arrow-rs/compare/master...tshauck:add-sub-day-increments-to-date64type?expand=1
--
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]