diff options
author | Reynold Xin <rxin@databricks.com> | 2015-07-02 20:47:04 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-07-02 20:47:04 -0700 |
commit | dfd8bac8f5b4f2b733c1ddd58e53ee0ba431e6b3 (patch) | |
tree | 503e05bc1b72a0a1e507f37f499d9bd46106661c /sql | |
parent | 1a7a7d7d579c5cba104daffbda977915802bf9b9 (diff) | |
download | spark-dfd8bac8f5b4f2b733c1ddd58e53ee0ba431e6b3.tar.gz spark-dfd8bac8f5b4f2b733c1ddd58e53ee0ba431e6b3.tar.bz2 spark-dfd8bac8f5b4f2b733c1ddd58e53ee0ba431e6b3.zip |
Minor style fix for the previous commit.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala index 701ab9912a..273a6c5016 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala @@ -21,10 +21,8 @@ import java.lang.{Long => JLong} import java.util.Arrays import org.apache.spark.sql.catalyst.analysis.TypeCheckResult -import org.apache.spark.sql.types._ -import org.apache.spark.sql.types.{StringType} import org.apache.spark.sql.catalyst.expressions.codegen._ -import org.apache.spark.sql.types.{DataType, DoubleType, LongType, IntegerType} +import org.apache.spark.sql.types._ import org.apache.spark.unsafe.types.UTF8String /** @@ -192,8 +190,7 @@ object Factorial { ) } -case class Factorial(child: Expression) - extends UnaryExpression with ExpectsInputTypes { +case class Factorial(child: Expression) extends UnaryExpression with ExpectsInputTypes { override def inputTypes: Seq[DataType] = Seq(IntegerType) @@ -204,8 +201,6 @@ case class Factorial(child: Expression) // If the value not in the range of [0, 20], it still will be null, so set it to be true here. override def nullable: Boolean = true - override def toString: String = s"factorial($child)" - override def eval(input: InternalRow): Any = { val evalE = child.eval(input) if (evalE == null) { @@ -372,8 +367,8 @@ case class Hex(child: Expression) extends UnaryExpression with Serializable { var len = 0 do { len += 1 - value(value.length - len) = Character.toUpperCase(Character - .forDigit((numBuf & 0xF).toInt, 16)).toByte + value(value.length - len) = + Character.toUpperCase(Character.forDigit((numBuf & 0xF).toInt, 16)).toByte numBuf >>>= 4 } while (numBuf != 0) UTF8String.fromBytes(Arrays.copyOfRange(value, value.length - len, value.length)) |