[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:
parent
9b225ac307
commit
0cd91f666d
|
@ -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)"
|
||||
|
|
Loading…
Reference in a new issue