maropu commented on a change in pull request #32552:
URL: https://github.com/apache/spark/pull/32552#discussion_r633204609
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapData.scala
##########
@@ -32,6 +32,23 @@ class ArrayBasedMapData(val keyArray: ArrayData, val
valueArray: ArrayData) exte
override def copy(): MapData = new ArrayBasedMapData(keyArray.copy(),
valueArray.copy())
+ override def equals(o: Any): Boolean = {
+ if (!o.isInstanceOf[ArrayBasedMapData]) {
+ return false
+ }
+
+ val other = o.asInstanceOf[ArrayBasedMapData]
+ if (other eq null) {
+ return false
+ }
+
+ this.keyArray == other.keyArray && this.valueArray == other.valueArray
+ }
+
+ override def hashCode: Int = {
+ keyArray.hashCode() * 37 + valueArray.hashCode()
+ }
+
Review comment:
This part was copied from https://github.com/apache/spark/pull/13847
--
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]