waitingkuo opened a new issue, #2979:
URL: https://github.com/apache/arrow-datafusion/issues/2979

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   
   Current 
[to_timestamp](https://arrow.apache.org/datafusion/user-guide/sql/datafusion-functions.html#to-timestamp)
 assume the input number is nanoseconds from 1970
   
   ```bash
   ❯ select to_timestamp(10);
   +-------------------------------+
   | totimestamp(Int64(10))        |
   +-------------------------------+
   | 1970-01-01 00:00:00.000000010 |
   +-------------------------------+
   1 row in set. Query took 0.000 seconds.
   ```
   
   while postgresql's is to assume the number is seonds from 1970
   ```bash
   willy=# select to_timestamp(10) at time zone 'utc';
         timezone       
   ---------------------
    1970-01-01 00:00:10
   (1 row)
   ``` 
   
   Should we align with postgrseql's?
   
   **Describe the solution you'd like**
   
   1. rename the original ```to_timestamp```  as to_timestamp_nanoseconds
   2. we do have a 
[to_timestamp_seconds](https://arrow.apache.org/datafusion/user-guide/sql/datafusion-functions.html#to-timestamp-seconds)
 for now. we could either rename it to ```to_timestamp``` or make a new 
```to_timestamp``` as ```to_timestamp_seconds```'s alias
   
   
   


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