Skip to content

Commit a9b52e5

Browse files
yjshenmarmbrus
authored andcommitted
[SPARK-2342] Evaluation helper's output type doesn't conform to input ty...
The function cast doesn't conform to the intention of "Those expressions are supposed to be in the same data type, and also the return type." comment Author: Yijie Shen <[email protected]> Closes apache#1283 from yijieshen/master and squashes the following commits: c7aaa4b [Yijie Shen] [SPARK-2342] Evaluation helper's output type doesn't conform to input type
1 parent 2b36344 commit a9b52e5

File tree

1 file changed

+1
-1
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions

1 file changed

+1
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ abstract class Expression extends TreeNode[Expression] {
111111
} else {
112112
e1.dataType match {
113113
case n: NumericType =>
114-
f.asInstanceOf[(Numeric[n.JvmType], n.JvmType, n.JvmType) => Int](
114+
f.asInstanceOf[(Numeric[n.JvmType], n.JvmType, n.JvmType) => n.JvmType](
115115
n.numeric, evalE1.asInstanceOf[n.JvmType], evalE2.asInstanceOf[n.JvmType])
116116
case other => sys.error(s"Type $other does not support numeric operations")
117117
}

0 commit comments

Comments
 (0)