[SPARK-3341][SQL] The dataType of Sqrt expression should be DoubleType.

Author: Takuya UESHIN <ueshin@happy-camper.st>

Closes #2233 from ueshin/issues/SPARK-3341 and squashes the following commits:

e497320 [Takuya UESHIN] Fix data type of Sqrt expression.
This commit is contained in:
Takuya UESHIN 2014-09-02 20:31:15 -07:00 committed by Michael Armbrust
parent 9b225ac307
commit 0cd91f666d

View file

@ -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)"