You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "NGA-TRAN (via GitHub)" <gi...@apache.org> on 2023/04/11 16:11:56 UTC

[GitHub] [arrow-datafusion] NGA-TRAN commented on issue #5689: `date_bin` doesn't work with `months` or `years`

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

   I start looking into this. The `date_bin` on month interval no longer errors out
   
   ```SQL
   select date_bin('1 month', column1)
   from (values
     (timestamp '2022-01-01 00:00:00'),
     (timestamp '2022-01-01 01:00:00'),
   (timestamp '2022-01-02 00:00:00')
   ) as sq;
   +-------------------------------------+
   | datebin(Utf8("1 month"),sq.column1) |
   +-------------------------------------+
   | 2021-12-29T00:00:00                 |
   | 2021-12-29T00:00:00                 |
   | 2021-12-29T00:00:00                 |
   +-------------------------------------+
   3 rows in set. Query took 0.008 seconds.
   ```
   
   I will read the `date_bin` document to see if this is the right output


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