alamb opened a new issue, #3963:
URL: https://github.com/apache/arrow-rs/issues/3963
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
In DataFusion we would like to add and subtract timestamps. While we
currently support this for scalar (singular) values we don't support it for
arrays.
So like
```sql
select * from foo where now() - INTERVAL '1 day'
```
will work
```sql
select * from foo where now() > foo.time + foo.sale_duration
```
(aka add `time` column to a `Interval` column)
**Describe the solution you'd like**
I would like the `add_dyn` and `subtract_dyn` kernels to handle
`Timestamp(Second, ..)` + `Interval(YearMonth)`
`Timestamp(Second, ..)` + `Interval(DayTime)`
`Timestamp(Second, ..)` + `Interval(MonthDayNano)`
`Timestamp(Millisecond, ..)` + `Interval(YearMonth)`
`Timestamp(Millisecond, ..)` + `Interval(DayTime)`
`Timestamp(Millisecond, ..)` + `Interval(MonthDayNano)`
`Timestamp(MicroSecond, ..)` + `Interval(YearMonth)`
`Timestamp(Microsecond, ..)` + `Interval(DayTime)`
`Timestamp(Microsecond, ..)` + `Interval(MonthDayNano)`
`Timestamp(Nanosecond, ..)` + `Interval(YearMonth)`
`Timestamp(Nanosecond, ..)` + `Interval(DayTime)`
`Timestamp(Nanosecond, ..)` + `Interval(MonthDayNano)`
**Describe alternatives you've considered**
<!--
A clear and concise description of any alternative solutions or features
you've considered.
-->
**Additional context**
Here is the support for `Date + Interval` -- we should be able to follow
much the same pattern for `Timestamp + interval` and `Timestamp - Interval`:
https://github.com/apache/arrow-rs/blob/9bd2bae586ed5b0edfd699f89a0855d79f61b611/arrow-arith/src/arithmetic.rs#L694-L740
--
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]