Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19940#discussion_r158336014
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
 ---
    @@ -1193,7 +1196,8 @@ case class ToUTCTimestamp(left: Expression, right: 
Expression)
             val dtu = DateTimeUtils.getClass.getName.stripSuffix("$")
             val tzTerm = ctx.addMutableState(tzClass, "tz",
               v => s"""$v = $dtu.getTimeZone("$tz");""")
    -        val utcTerm = ctx.addMutableState(tzClass, "utc",
    +        val utcTerm = "tzUTC"
    +        ctx.addImmutableStateIfNotExists(tzClass, utcTerm,
               v => s"""$v = $dtu.getTimeZone("UTC");""")
    --- End diff --
    
    yes, there is no difference between them in practice. But I think that 
being consistent would be better for readability


---

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

Reply via email to