aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst
diff options
context:
space:
mode:
authorYijie Shen <henry.yijieshen@gmail.com>2014-07-03 13:22:13 -0700
committerMichael Armbrust <michael@databricks.com>2014-07-03 13:22:24 -0700
commit7766c9d26c489498b4ad4ff20868e4555990d7eb (patch)
tree868e3cb312063623584979be39b99e1b5232ffa8 /sql/catalyst
parentfdee6ee0655f04e9a0d3a66f2e8df5486a5ea032 (diff)
downloadspark-7766c9d26c489498b4ad4ff20868e4555990d7eb.tar.gz
spark-7766c9d26c489498b4ad4ff20868e4555990d7eb.tar.bz2
spark-7766c9d26c489498b4ad4ff20868e4555990d7eb.zip
[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 <henry.yijieshen@gmail.com> Closes #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 (cherry picked from commit a9b52e5623f7fc77fca96b095f9eeaef76e35d54) Signed-off-by: Michael Armbrust <michael@databricks.com>
Diffstat (limited to 'sql/catalyst')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
index 0411ce3aef..ba62dabe3d 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
@@ -111,7 +111,7 @@ abstract class Expression extends TreeNode[Expression] {
} else {
e1.dataType match {
case n: NumericType =>
- f.asInstanceOf[(Numeric[n.JvmType], n.JvmType, n.JvmType) => Int](
+ f.asInstanceOf[(Numeric[n.JvmType], n.JvmType, n.JvmType) => n.JvmType](
n.numeric, evalE1.asInstanceOf[n.JvmType], evalE2.asInstanceOf[n.JvmType])
case other => sys.error(s"Type $other does not support numeric operations")
}