alamb commented on pull request #9434:
URL: https://github.com/apache/arrow/pull/9434#issuecomment-786199045


   > There is a problem, DF executes BinaryExpr by casting left and right sides 
which is not needed for timestamp - interval, because this calculation is 
exception in this case and should be done without casting. I am thinking how 
it's better to resolve it.
   
   I think the "casts" in this case are very cheap -- namely no data is 
actually copied
   
   I am thinking for example `Int32` -> `Time32` cast 
https://github.com/apache/arrow/blob/master/rust/arrow/src/compute/kernels/cast.rs#L597
   
    calls `cast_array_data` - 
https://github.com/apache/arrow/blob/master/rust/arrow/src/compute/kernels/cast.rs#L871-L885
 which basically just re-uses the same underlying data and reinterprets it as 
the desired type
   
   So I am not sure if there is a major problem or not to have a cast if the 
cast is effectively doing no real work


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to