You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/06/17 15:43:55 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #24889: [SPARK-28072][SQL] Use `Iso8601TimestampFormatter` in `FromUnixTime` codegen to fix ICCE in JDK9+

dongjoon-hyun commented on a change in pull request #24889: [SPARK-28072][SQL] Use `Iso8601TimestampFormatter` in `FromUnixTime` codegen to fix ICCE in JDK9+
URL: https://github.com/apache/spark/pull/24889#discussion_r294364101
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
 ##########
 @@ -859,11 +859,11 @@ case class FromUnixTime(sec: Expression, format: Expression, timeZoneId: Option[
     } else {
       val zid = ctx.addReferenceObj("zoneId", zoneId, classOf[ZoneId].getName)
       val locale = ctx.addReferenceObj("locale", Locale.US)
-      val tf = TimestampFormatter.getClass.getName.stripSuffix("$")
+      val tf = classOf[Iso8601TimestampFormatter].getName
       nullSafeCodeGen(ctx, ev, (seconds, f) => {
         s"""
         try {
-          ${ev.value} = UTF8String.fromString($tf.apply($f.toString(), $zid, $locale).
 
 Review comment:
   Scala seems to fix this issue bacause `TimestampFormatter.apply` works in `scala-shell`. `Janino` seems to be behind.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org