Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/19729#discussion_r150421423
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
---
@@ -604,6 +604,8 @@ case class Least(children: Seq[Expression]) extends
Expression {
val evalChildren = children.map(_.genCode(ctx))
val first = evalChildren(0)
--- End diff --
I know what you did. This PR cannot follow the approach straightforward due
to initial value. We can easily know `min`/`max` value for primitive type for
an initial value. How can we know the initial value for complicated type?
IMHO, the first element would be good for an initial value.
What do you think?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]