You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2025/09/08 13:43:49 UTC
Re: [I] [C++] Support DST-aware timestamp + interval addition [arrow]
pitrou commented on issue #47400:
URL: https://github.com/apache/arrow/issues/47400#issuecomment-3266407375
Also, we should be careful to follow Pandas' logic when adding/subtracting a mixed interval:
```python
>>> end = begin + pd.DateOffset(days=1, hours=24)
>>> end - pd.DateOffset(days=1, hours=24) == begin
True
>>> end == begin + pd.DateOffset(days=1) + pd.DateOffset(hours=24)
True
>>> end == begin + pd.DateOffset(hours=24) + pd.DateOffset(days=1)
False
>>> end - pd.DateOffset(days=1) - pd.DateOffset(hours=24) == begin
False
>>> end - pd.DateOffset(hours=24) - pd.DateOffset(days=1) == begin
True
```
--
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