HeartSaVioR edited a comment on issue #26709: [SPARK-30075][CORE][TESTS] Fix the hashCode implementation of ArrayKeyIndexType correctly URL: https://github.com/apache/spark/pull/26709#issuecomment-559687011 I'm also seeing possible spot to touch: ArrayWrappers. https://github.com/apache/spark/blob/master/common/kvstore/src/main/java/org/apache/spark/util/kvstore/ArrayWrappers.java ComparableXXXArray implements its own hashCode, which would work as IDE creates similar code, but how about simply using `Arrays.hashCode()`? The major difference between custom code and Arrays.hashCode() would be "for loop with int index" and "for each loop", which I'm not sure there's outstanding difference - the array is expected to be fairly small. Arrays.hashCode() is also null safe while custom code is not. If it also makes sense, I'll address it altogether in this PR. Thanks in advance!
---------------------------------------------------------------- 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] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
