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

   ### Describe the bug
   
   double (float64) value V cast to timestamp(9) (nanosecond precision) type 
produces different values T1 or T2, depending on whether V is a constant
   
   
   
   ### To Reproduce
   
   ```
   > SELECT CAST(CAST(1 AS double) AS timestamp(9));
   +---------------------+
   | Int64(1)            |
   +---------------------+
   | 1970-01-01T00:00:01 |
   +---------------------+
   1 row(s) fetched.
   Elapsed 0.006 seconds.
   
   > SELECT CAST(CAST(x AS double) AS timestamp(9)) from (values (1)) t(x);
   +-------------------------------+
   | t.x                           |
   +-------------------------------+
   | 1970-01-01T00:00:00.000000001 |
   +-------------------------------+
   ```
   
   ### Expected behavior
   
   The queries should produce same result
   
   
   
   ### Additional context
   
   - rels https://github.com/apache/datafusion/issues/16531


-- 
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-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to