maropu commented on a change in pull request #32577:
URL: https://github.com/apache/spark/pull/32577#discussion_r636578273
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/sources/filters.scala
##########
@@ -174,7 +174,8 @@ case class In(attribute: String, values: Array[Any])
extends Filter {
case _ => false
}
override def toString: String = {
- s"In($attribute, [${values.mkString(",")}])"
+ // Sort elements for deterministic behaviours
+ s"In($attribute, [${values.map(_.toString).sorted.mkString(",")}])"
Review comment:
It seems `String.valueOf` throws a null pointer exception, too. To make
matters worse, I found another issue here, so I've filed jira and made a PR to
fix this issue and the new one. See: https://github.com/apache/spark/pull/32615
```
scala> String.valueOf(null)
java.lang.NullPointerException
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]