You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/09/06 12:50:42 UTC

[GitHub] [spark] cloud-fan commented on pull request #37771: [SPARK-40315][SQL] Add equals() and hashCode() to ArrayBasedMapData

cloud-fan commented on PR #37771:
URL: https://github.com/apache/spark/pull/37771#issuecomment-1238107463

   There are 2 things:
   1. SQL semantic: map type is not orderable and can't be used as join/group keys
   2. MapData needs to implement equals/hashCode as we need to look up plans (e.g. in CacheManager) and plans may contain map literals.
   
   In long term, we need to support equality check of map values, so that we can use map type as join/group keys. In short term, we need to correctly implement `QueryPlan.semanticEquals` which requires correct `hashCode/equals` of map literals.
   
   I'm +1 to this idea: `I'm going to make another variant of this PR and fix the hashCode only for Literal of ArrayBasedMapData`


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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