spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marmb...@apache.org
Subject git commit: [SPARK-3204][SQL] MaxOf would be foldable if both left and right are foldable.
Date Mon, 25 Aug 2014 23:27:10 GMT
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 <ueshin@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 <ueshin@happy-camper.st>
Authored: Mon Aug 25 16:27:00 2014 -0700
Committer: Michael Armbrust <michael@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


Mime
View raw message