Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19729#discussion_r150422088
--- 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 don't see any difference on the initial value. IMHO the initial value in
my PR as well as here should be "null", which means `ev. isNull` to `true` and
the initial value for `ev.value` is irrelevant and it could be set to what is
returned by the `defaultValue` function of the `CodegenContext`. Do you have
any concern with this?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]