Skip to content

Commit

Permalink
Update Cast.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
baishuo authored and liancheng committed Sep 17, 2014
1 parent 0e18496 commit c1a59dd
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
package org.apache.spark.sql.catalyst.expressions

import java.sql.Timestamp
import java.text.{DateFormat, SimpleDateFormat}
import java.text.{DateFormat, NumberFormat, SimpleDateFormat}

import org.apache.spark.sql.catalyst.types._
import java.util.Locale

/** Cast the child expression to the target data type. */
case class Cast(child: Expression, dataType: DataType) extends UnaryExpression {
Expand Down Expand Up @@ -271,4 +272,9 @@ object Cast {
new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
}
}
private[sql] val threadLocalNumberFormat = new ThreadLocal[NumberFormat] {
override def initialValue() = {
NumberFormat.getInstance()
}
}
}

0 comments on commit c1a59dd

Please sign in to comment.