alamb commented on issue #194:
URL: 
https://github.com/apache/arrow-datafusion/issues/194#issuecomment-839650054


   I have been thinking about this and did some digging in the code. There are 
probably two major strategies:
   1. Implement arrow compute kernels (as @jorgecarleitao  points to in 
https://github.com/jorgecarleitao/arrow2/blob/main/src/compute/arithmetics/time.rs#L208)
   2. Implement the operations in datafusion itself (by casting the various 
time arrays to their primitive i64 versions, performing whatever math is 
needed, and then casting them back to the resulting type)
   
   Long term I think approach 1 is likely both the "cleanest" and fastest 
performance approach, but it will take non trivial time.
   
   I may try to bound the time required by just implementing subtraction (end 
to end in arrow + datafusion), and filing tickets to fill out the rest of the 
operations (the most useful ones are described in the [postgres 
docs](https://www.postgresql.org/docs/current/functions-datetime.html))


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to