Omega359 opened a new issue, #19022:
URL: https://github.com/apache/datafusion/issues/19022

   ### Is your feature request related to a problem or challenge?
   
   ```sql
   select pg_typeof('2020-01-01'::date + '1900-01-01 12:46:00'::time);
   ----
   timestamp without time zone
   ```
   
   This is a useful feature for allowing date columns and time columns to be 
combined into a timestamp. 
   
   It seems to be missing from 
[type_coercion](https://github.com/apache/datafusion/blob/5519b6145717aa974d13027409a48a286218d3a5/datafusion/expr-common/src/type_coercion/binary.rs#L1804)
 however that code is used for both arithmetic and comparison so it's not 
enough to just add a branch there and call it done.
   
   @pepijnve pointed out that this may be also an arrow limitation as it seems 
to be missing in arrow-arith's 
[date_op](https://github.com/apache/arrow-rs/blob/d76bfb17715261a9c907d1f5187d25a1de21df35/arrow-arith/src/numeric.rs#L736)
   
   ### Describe the solution you'd like
   
   The sql should work correctly to add date and time fields to get a 
timestamp(Second, None) field.
   
   ### Describe alternatives you've considered
   
   Cast to strings and parse from the string representation.
   
   ### Additional context
   
   _No response_


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to