You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/04/01 15:42:01 UTC

[GitHub] [arrow-rs] alamb commented on issue #3964: Subtracting `Timestamp` from `Timestamp` should produce a `Duration` (not `Timestamp`)

alamb commented on issue #3964:
URL: https://github.com/apache/arrow-rs/issues/3964#issuecomment-1493012999

   I think it would be fine to support converting to duration in arrow-rs (and we can convert to Interval in datafusion as needed)
   
   The reason we are pushing ahead with interval (rather than interval and duration) in DataFusion is to get something working incrementally without having to sort out all the subtleties with Intervals, Durations, arithmetic and conversions. 
   
   Then I think over time we can and will add more sophistication (like making the distinction between Duration and Interval and coercing automatically between them)  to DataFusion
   
   Thus, I suggest we get the kernels correct in arrow-rs (and provide the appropriate casting operations) and then we can upgrade DataFusion to use them. 
   
   So in this case, let's have timestamp - timestamp produce duration in arrow.rs sounds good.
   
   I will also file a ticket about casting to/from Duration and Interval


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