Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22110#discussion_r210561778
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/TypeUtils.scala 
---
    @@ -73,4 +73,14 @@ object TypeUtils {
         }
         x.length - y.length
       }
    +
    +  /**
    +   * Returns true if elements of the data type could be used as items of a 
hash set or as keys
    +   * of a hash map.
    +   */
    +  def typeCanBeHashed(dataType: DataType): Boolean = dataType match {
    --- End diff --
    
    we should, and I believe Spark has enforced it with style checker: when you 
override `equals`, you must override `hashCode` too.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to