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

[GitHub] [arrow-datafusion] berkaysynnada commented on pull request #5846: Removal of arithmetic operations for temporal values to binary.rs

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org