berkaysynnada commented on PR #5846:
URL: 
https://github.com/apache/arrow-datafusion/pull/5846#issuecomment-1497725564

   > What I am hoping we can do is to move the temporal logic into kernels such 
as
   > 
   > ```rust
   > pub fn add_dyn(lhs: ArrayRef, rhs: ArrayRef) -> Result<ArrayRef> {
   >   match(lhs.data_type(), rhs.data_type()) {
   >     (DataType::Timestamp, DataType::Interval) => {
   >     // call timestamp + interval code
   >     },
   >     // handle other temporal types
   >     _ => {
   >       // fall back to kernels in arrow-rs
   >       arrow::compute::add_dyn(...)
   >     }
   > }
   > ```
   > 
   > With this pattern, once the arrow kernel supports interval arithmetic, we 
can remove the shim datafusion.
   > 
   > We followed this pattern initially when implementing much of the decimal 
arithmetic, and it worked well I think
   > 
   > 
https://github.com/apache/arrow-datafusion/blob/main/datafusion/physical-expr/src/expressions/binary/kernels_arrow.rs
   > 
   > Is this something you can help with @berkaysynnada ?
   
   I have other commitments currently. I would be happy to help when I have 
more time, but anyone interested can contact me.


-- 
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: [email protected]

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

Reply via email to