cloud-fan commented on a change in pull request #33994:
URL: https://github.com/apache/spark/pull/33994#discussion_r711049759
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala
##########
@@ -4238,28 +4245,36 @@ case class ArrayExcept(left: Expression, right:
Expression) extends ArrayBinaryL
body
}
- val processArray1 = withArray1NullAssignment(
+ val body =
s"""
- |$jt $value = ${genGetValue(array1, i)};
|if (!$hashSet.contains($hsValueCast$value)) {
| if (++$size > ${ByteArrayMethods.MAX_ROUNDED_ARRAY_LENGTH}) {
| break;
| }
| $hashSet.add$hsPostFix($hsValueCast$value);
| $builder.$$plus$$eq($value);
|}
- """.stripMargin)
+ """.stripMargin
+
+ val processArray1 = withArray1NullAssignment(
+ s"$jt $value = ${genGetValue(array1, i)};" +
+ SQLOpenHashSet.withNaNCheckCode(elementType, value, hashSet, body,
+ (valueNaN: String) =>
+ s"""
+ |$size++;
+ |$builder.$$plus$$eq($valueNaN);
+ """.stripMargin))
// Only need to track null element index when array1's element is
nullable.
val declareNullTrackVariables = if
(left.dataType.asInstanceOf[ArrayType].containsNull) {
s"""
- |boolean $notFoundNullElement = true;
|int $nullElementIndex = -1;
""".stripMargin
} else {
""
}
+
Review comment:
unnecessary change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]