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

   > 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 ?
   
   @alamb would you mind taking a look at this 
[PR](https://github.com/synnada-ai/arrow-datafusion/pull/83) when you have 
time? I tried to implement the changes you suggested. Since the only evaluation 
of array vs array operations are merged yet (array vs scalar implementation PR 
will be opened soon), I worked on them. The same approach can be applied to 
array vs scalar part after it is merged. Thanks for your feedback


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