Skip to content

Commit

Permalink
fix merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaido91 committed Dec 20, 2017
1 parent c650196 commit 6143b22
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ case class WeekOfYear(child: Expression) extends UnaryExpression with ImplicitCa
val cal = classOf[Calendar].getName
val c = "calWeekOfYear"
val dtu = DateTimeUtils.getClass.getName.stripSuffix("$")
ctx.addMutableState(cal, c, v =>
ctx.addImmutableStateIfNotExists(cal, c, v =>
s"""
|$v = $cal.getInstance($dtu.getTimeZone("UTC"));
|$v.setFirstDayOfWeek($cal.MONDAY);
Expand Down Expand Up @@ -1197,7 +1197,7 @@ case class ToUTCTimestamp(left: Expression, right: Expression)
val tzTerm = ctx.addMutableState(tzClass, "tz",
v => s"""$v = $dtu.getTimeZone("$tz");""")
val utcTerm = "tzUTC"
ctx.addMutableState(tzClass, utcTerm,
ctx.addImmutableStateIfNotExists(tzClass, utcTerm,
v => s"""$v = $dtu.getTimeZone("UTC");""")
val eval = left.genCode(ctx)
ev.copy(code = s"""
Expand Down

0 comments on commit 6143b22

Please sign in to comment.