Github user tarekauel commented on a diff in the pull request:
https://github.com/apache/spark/pull/7197#discussion_r33824778
--- Diff:
unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java ---
@@ -209,6 +242,16 @@ public boolean equals(final Object other) {
@Override
public int hashCode() {
- return Arrays.hashCode(bytes);
+ long result = 1;
--- End diff --
Maybe it's a stupid question, but why do we start with `result = 1` instead
of `0`, compared to
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#1493
and
http://grepcode.com/file/repository.cloudera.com/content/repositories/releases/org.apache.hadoop.hive/hive-exec/0.7.1-cdh3u1/org/apache/hadoop/hive/ql/udf/generic/GenericUDFHash.java#47
Do we want to cache the hash value like OpenJdk?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]