You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "berkaysynnada (via GitHub)" <gi...@apache.org> on 2023/02/27 10:12:06 UTC
[GitHub] [arrow-datafusion] berkaysynnada opened a new issue, #5413: Interval plus(+) Timestamp operation support
berkaysynnada opened a new issue, #5413:
URL: https://github.com/apache/arrow-datafusion/issues/5413
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
While we can add intervals to timestamp variants (LHS: Timestamp (like `TimestampSecond`), RHS: Interval (like `IntervalYearMonth`)), we cannot replace the sides (LHS: Interval, RHS: Timestamp), and get the error
`Err(Internal("Operator + is not implemented for variants IntervalYearMonth(\"1\") and TimestampSecond(12345678, None)"))`
Addition should be commutative for intervals and timestamps, unlike subtraction.
**Describe the solution you'd like**
In `impl_op` macro, the match arms can be extended to handle Interval variants for addition, and an adder function can be implemented.
**Describe alternatives you've considered**
Only the order of the parameters can be changed before calling that `impl_op` macro since **Timestamp + Interval** operations are working.
**Additional context**
This feature can also be extended to cover operations between interval variants (`IntervalYearMonth`, `IntervalDayTime`, `IntervalMonthDayNano`). We can use addition and subtraction operators between them (negatively resulting situations should be under consideration).
--
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: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #5413: Interval plus(+) Timestamp operation support
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5413:
URL: https://github.com/apache/arrow-datafusion/issues/5413#issuecomment-1458888431
And there is a proposed PR to add this functionality: https://github.com/apache/arrow-datafusion/pull/5491 🎉
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #5413: Interval plus(+) Timestamp operation support
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #5413:
URL: https://github.com/apache/arrow-datafusion/issues/5413#issuecomment-1456189395
I think this would be a good first issue as datafusion already supports `timestamp + interval` so this PR is about figuring out enough of binary.rs to support `interval + timestamp`. Also added to https://github.com/apache/arrow-datafusion/issues/3148 to track
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb closed issue #5413: Interval plus(+) Timestamp operation support
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #5413: Interval plus(+) Timestamp operation support
URL: https://github.com/apache/arrow-datafusion/issues/5413
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org