You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by da...@apache.org on 2016/04/24 01:42:02 UTC
spark git commit: [MINOR] [SQL] Fix error message string in
nullSafeEvel of TernaryExpression
Repository: spark
Updated Branches:
refs/heads/master 162e12b08 -> bebb0240e
[MINOR] [SQL] Fix error message string in nullSafeEvel of TernaryExpression
## What changes were proposed in this pull request?
TernaryExpressions should thows proper error message for itself.
```scala
protected def nullSafeEval(input1: Any, input2: Any, input3: Any): Any =
- sys.error(s"BinaryExpressions must override either eval or nullSafeEval")
+ sys.error(s"TernaryExpressions must override either eval or nullSafeEval")
```
## How was this patch tested?
Manual.
Author: Dongjoon Hyun <do...@apache.org>
Closes #12642 from dongjoon-hyun/minor_fix_error_msg_in_ternaryexpression.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/bebb0240
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/bebb0240
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/bebb0240
Branch: refs/heads/master
Commit: bebb0240e6ece6ec7c79bdd62098529146fcb0c0
Parents: 162e12b
Author: Dongjoon Hyun <do...@apache.org>
Authored: Sat Apr 23 16:39:35 2016 -0700
Committer: Davies Liu <da...@gmail.com>
Committed: Sat Apr 23 16:39:35 2016 -0700
----------------------------------------------------------------------
.../org/apache/spark/sql/catalyst/expressions/Expression.scala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/bebb0240/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
----------------------------------------------------------------------
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 7dacdaf..c26faee 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
@@ -45,6 +45,7 @@ import org.apache.spark.sql.types._
* - [[LeafExpression]]: an expression that has no child.
* - [[UnaryExpression]]: an expression that has one child.
* - [[BinaryExpression]]: an expression that has two children.
+ * - [[TernaryExpression]]: an expression that has three children.
* - [[BinaryOperator]]: a special case of [[BinaryExpression]] that requires two children to have
* the same output data type.
*
@@ -531,7 +532,7 @@ abstract class TernaryExpression extends Expression {
* of evaluation process, we should override [[eval]].
*/
protected def nullSafeEval(input1: Any, input2: Any, input3: Any): Any =
- sys.error(s"BinaryExpressions must override either eval or nullSafeEval")
+ sys.error(s"TernaryExpressions must override either eval or nullSafeEval")
/**
* Short hand for generating ternary evaluation code.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org