You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "brancz (via GitHub)" <gi...@apache.org> on 2025/07/24 15:49:36 UTC

[I] Support casting int64 to interval [arrow-rs]

brancz opened a new issue, #7988:
URL: https://github.com/apache/arrow-rs/issues/7988

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   We have a lot of data where there is a duration that's stored as number of nanoseconds, and we'd like to do all the things we can do with intervals with it.
   
   **Describe the solution you'd like**
   
   Implement support for casting int64 to interval types.
   
   **Describe alternatives you've considered**
   
   Change the data to be produced as intervals immediately. Unfortunately this is historic data though and that is not really possible.
   
   **Additional context**
   
   n/a
   


-- 
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


Re: [I] Support casting int64 to interval [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7988:
URL: https://github.com/apache/arrow-rs/issues/7988#issuecomment-3130014614

   `label_issue.py` automatically added labels {'arrow'} from #7989


-- 
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


Re: [I] Support casting int64 to interval [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #7988:
URL: https://github.com/apache/arrow-rs/issues/7988#issuecomment-3130014688

   `label_issue.py` automatically added labels {'documentation'} from #8002


-- 
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


Re: [I] Support casting int64 to interval [arrow-rs]

Posted by "brancz (via GitHub)" <gi...@apache.org>.
brancz closed issue #7988: Support casting int64 to interval
URL: https://github.com/apache/arrow-rs/issues/7988


-- 
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


Re: [I] Support casting int64 to interval [arrow-rs]

Posted by "brancz (via GitHub)" <gi...@apache.org>.
brancz commented on issue #7988:
URL: https://github.com/apache/arrow-rs/issues/7988#issuecomment-3116741507

   Commented on the PR as well, but I didn't realize that this already works, just not directly from int64 to interval, it first has to go through a duration nanoseconds.
   
   ```
   > select arrow_cast(arrow_cast(arrow_cast(100000000, 'Int64'), 'Duration(Nanosecond)'), 'Interval(MonthDayNano)');
   +--------------------------------------------------------------------------------------------------------------------------------+
   | arrow_cast(arrow_cast(arrow_cast(Int64(100000000),Utf8("Int64")),Utf8("Duration(Nanosecond)")),Utf8("Interval(MonthDayNano)")) |
   +--------------------------------------------------------------------------------------------------------------------------------+
   | 0.100000000 secs                                                                                                               |
   +--------------------------------------------------------------------------------------------------------------------------------+
   ```
   


-- 
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