You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2014/08/26 01:27:10 UTC
git commit: [SPARK-3204][SQL] MaxOf would be foldable if both left
and right are foldable.
Repository: spark
Updated Branches:
refs/heads/master 805fec845 -> d299e2bf2
[SPARK-3204][SQL] MaxOf would be foldable if both left and right are foldable.
Author: Takuya UESHIN <ue...@happy-camper.st>
Closes #2116 from ueshin/issues/SPARK-3204 and squashes the following commits:
7d9b107 [Takuya UESHIN] Make MaxOf foldable if both left and right are foldable.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d299e2bf
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d299e2bf
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d299e2bf
Branch: refs/heads/master
Commit: d299e2bf2f6733a6267b7ce85e2b288608b17db3
Parents: 805fec8
Author: Takuya UESHIN <ue...@happy-camper.st>
Authored: Mon Aug 25 16:27:00 2014 -0700
Committer: Michael Armbrust <mi...@databricks.com>
Committed: Mon Aug 25 16:27:00 2014 -0700
----------------------------------------------------------------------
.../org/apache/spark/sql/catalyst/expressions/arithmetic.scala | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/d299e2bf/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
index 8d90614..5f8b6ae 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
@@ -89,6 +89,8 @@ case class Remainder(left: Expression, right: Expression) extends BinaryArithmet
case class MaxOf(left: Expression, right: Expression) extends Expression {
type EvaluatedType = Any
+ override def foldable = left.foldable && right.foldable
+
override def nullable = left.nullable && right.nullable
override def children = left :: right :: Nil
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org