Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/22044#discussion_r208856510
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
---
@@ -3517,56 +3510,24 @@ case class ArrayDistinct(child: Expression)
""".stripMargin
}
- private def setNotNullValue(isPrimitive: Boolean,
+ private def setNotNullValue(
distinctArray: String,
pos: String,
getValue1: String,
primitiveValueTypeName: String): String = {
- if (!isPrimitive) {
- s"$distinctArray[$pos] = $getValue1";
- } else {
- s"$distinctArray.set$primitiveValueTypeName($pos, $getValue1)";
- }
+ s"$distinctArray.set$primitiveValueTypeName($pos, $getValue1)"
}
private def setValueForFastEval(
--- End diff --
Maybe we should rename this.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]