MaxGekk commented on a change in pull request #28593:
URL: https://github.com/apache/spark/pull/28593#discussion_r427941581



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
##########
@@ -454,7 +459,10 @@ abstract class CastBase extends UnaryExpression with 
TimeZoneAwareExpression wit
   }
 
   // converting seconds to us
-  private[this] def longToTimestamp(t: Long): Long = SECONDS.toMicros(t)
+  private[this] def longToTimestamp(t: Long): Long = {
+    if (SQLConf.get.numericConvertToTimestampInSeconds) t * MICROS_PER_SECOND

Review comment:
       Don't think checking the flag per every values is good idea. This will 
badly impact on performance.




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

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