NGA-TRAN commented on issue #5689:
URL: 
https://github.com/apache/arrow-datafusion/issues/5689#issuecomment-1504185715

   Update: 2 major things I need to do:
   
   1. We should support `IntervalMonthDayNano` 
[here](https://github.com/apache/arrow-datafusion/blob/263bded3e250311311b136182fec54228cc09166/datafusion/physical-expr/src/datetime_expressions.rs#L390).
 This query hits this:2. 
      ```SQL
      SELECT DATE_BIN(INTERVAL '1 month', TIMESTAMP '2022-01-01 00:00:00Z', 
TIMESTAMP '1970-01-01T00:00:00Z');
      ```
   
   3. We should don't convert month interval into `IntervalDayTime` that leads 
us 
[here](https://github.com/apache/arrow-datafusion/blob/263bded3e250311311b136182fec54228cc09166/datafusion/physical-expr/src/datetime_expressions.rs#L375).
 This query hist this:
      ```SQL
      select date_bin('1 month', column1)
   from (values
     (timestamp '2022-01-01 00:00:00')
   ) as sq;
      ```
   
   


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