Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/1935#discussion_r16509864
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
---
@@ -85,3 +85,21 @@ case class Remainder(left: Expression, right:
Expression) extends BinaryArithmet
override def eval(input: Row): Any = i2(input, left, right, _.rem(_, _))
}
+
+case class MaxOf(left: Expression, right: Expression) extends Expression {
+ type EvaluatedType = Any
+
+ override def nullable = left.nullable && right.nullable
+
+ override def children = left :: right :: Nil
+
+ override def references = (left.flatMap(_.references) ++
right.flatMap(_.references)).toSet
+
+ override def dataType = left.dataType
+
+ override def eval(input: Row): Any = {
+ val leftEval = left.eval(input)
--- End diff --
The code was missing, I just added it.
On Aug 20, 2014 3:18 PM, "Reynold Xin" <[email protected]> wrote:
> In
>
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala:
>
> > @@ -85,3 +85,21 @@ case class Remainder(left: Expression, right:
Expression) extends BinaryArithmet
> >
> > override def eval(input: Row): Any = i2(input, left, right, _.rem(_,
_))
> > }
> > +
> > +case class MaxOf(left: Expression, right: Expression) extends
Expression {
> > + type EvaluatedType = Any
> > +
> > + override def nullable = left.nullable && right.nullable
> > +
> > + override def children = left :: right :: Nil
> > +
> > + override def references = (left.flatMap(_.references) ++
right.flatMap(_.references)).toSet
> > +
> > + override def dataType = left.dataType
> > +
> > + override def eval(input: Row): Any = {
> > + val leftEval = left.eval(input)
>
> what do u mean?
>
> â
> Reply to this email directly or view it on GitHub
> <https://github.com/apache/spark/pull/1935/files#r16509768>.
>
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]