findepi commented on code in PR #16639:
URL: https://github.com/apache/datafusion/pull/16639#discussion_r2184559372


##########
datafusion/sqllogictest/test_files/timestamps.slt:
##########
@@ -394,12 +503,12 @@ SELECT COUNT(*) FROM ts_data_secs where ts > 
to_timestamp_seconds('2020-09-08 12
 query PPP
 SELECT to_timestamp(1.1) as c1, cast(1.1 as timestamp) as c2, 1.1::timestamp 
as c3;
 ----
-1970-01-01T00:00:01.100 1970-01-01T00:00:01.100 1970-01-01T00:00:01.100
+1970-01-01T00:00:01.100 1970-01-01T00:00:00.000000001 
1970-01-01T00:00:00.000000001

Review Comment:
   > both different than it was previously
   
   it's NOT!
   
   it's different ONLY in constant folding context.
   
   BTW `to_timestamp(1.1)` works the way it seems to work on constant folding 
context only too, i filed https://github.com/apache/datafusion/issues/16678 for 
this, but this PR fixes this problem as well.
   
   > What do we think about simply not supporting explicit conversion from 
float --> timestamp
   
   I am supportive of that. Same for decimals and perhaps ints.
   
   But it's definitely more work and more controversial change.
   So we should first fix https://github.com/apache/datafusion/issues/16636, 
https://github.com/apache/datafusion/issues/16531 and 
https://github.com/apache/datafusion/issues/16678 which are code bugs bringing 
embarrassment to the project and data corruption to the users.
   
   



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

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