Repository: spark Updated Branches: refs/heads/master 9b225ac30 -> 0cd91f666
[SPARK-3341][SQL] The dataType of Sqrt expression should be DoubleType. Author: Takuya UESHIN <[email protected]> Closes #2233 from ueshin/issues/SPARK-3341 and squashes the following commits: e497320 [Takuya UESHIN] Fix data type of Sqrt expression. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0cd91f66 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0cd91f66 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0cd91f66 Branch: refs/heads/master Commit: 0cd91f666dfe318934d5d41d3cb7085b2f9ae278 Parents: 9b225ac Author: Takuya UESHIN <[email protected]> Authored: Tue Sep 2 20:31:15 2014 -0700 Committer: Michael Armbrust <[email protected]> Committed: Tue Sep 2 20:31:15 2014 -0700 ---------------------------------------------------------------------- .../org/apache/spark/sql/catalyst/expressions/arithmetic.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/0cd91f66/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala ---------------------------------------------------------------------- diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala index 56f0428..f988fb0 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala @@ -36,7 +36,7 @@ case class UnaryMinus(child: Expression) extends UnaryExpression { case class Sqrt(child: Expression) extends UnaryExpression { type EvaluatedType = Any - def dataType = child.dataType + def dataType = DoubleType override def foldable = child.foldable def nullable = child.nullable override def toString = s"SQRT($child)" --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
