gengliangwang commented on code in PR #58028:
URL: https://github.com/apache/spark/pull/58028#discussion_r3992564854


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:
##########
@@ -1022,7 +1022,18 @@ case class Cast(
     (d.toBigDecimal * MICROS_PER_SECOND).longValue
   }
   private[this] def doubleToTimestamp(d: Double): Any = {

Review Comment:
   There are also many other casting which will lead to slience overflows.  For 
example, Float/Double to Int. Why we changing timestamp specially? 
   Since ANSI mode is on by default now, shall we keep the legacy behavior as 
it is?
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to