Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19883#discussion_r155221911
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
---
@@ -444,11 +444,11 @@ case class DayOfWeek(child: Expression) extends
UnaryExpression with ImplicitCas
val cal = classOf[Calendar].getName
val c = ctx.freshName("cal")
val dtu = DateTimeUtils.getClass.getName.stripSuffix("$")
- ctx.addMutableState(cal, c, s"""$c =
$cal.getInstance($dtu.getTimeZone("UTC"));""")
--- End diff --
but this is done every time, since we are crating a new one for each
expression
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]