waitingkuo commented on issue #5641:
URL: 
https://github.com/apache/arrow-datafusion/issues/5641#issuecomment-1476359597

   hi @alamb thank you for raising this, it looks great.
   
   one thing i'm still struggleing is whether
   `select date_bin('30 minutes', '1970-01-01T00:31:01+08:00')`;
   should output 
   `1969-12-31T16:30:00`
   or 
   `1970-01-01T00:30:00`
   
   
   
   
   
   note that datafusion currently outputs `timestamp`
   ```bash
   ❯ select date_bin('30 minutes', timestamp '1970-01-01T00:31:01+08:00', 
'1970-01-01');
   
+----------------------------------------------------------------------------------+
   | datebin(Utf8("30 
minutes"),Utf8("1970-01-01T00:31:01+08:00"),Utf8("1970-01-01")) |
   
+----------------------------------------------------------------------------------+
   | 1969-12-31T16:30:00                                                        
      |
   
+----------------------------------------------------------------------------------+
   1 row in set. Query took 0.003 seconds.
   ```
   while posgresql outputs `timestamptz` if either `source` or `origin` is 
`timestamptz`
   ```willy=# select date_bin('30 minutes', '1970-01-01T00:31:01+08:00', 
'1970-01-01');
           date_bin        
   ------------------------
    1969-12-31 16:30:00+00
   (1 row)
   ```
   


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