Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19729#discussion_r150419114
--- 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 --
what about avoiding splitting `first` and `rest` and treat them all the
same? Since the declaration of `ev.isNull` and `ev.value` is moved, they can
all be treated the same way. In this way the code would be cleaner, wouldn't it?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]