JingsongLi commented on a change in pull request #10756: [FLINK-15465][FLINK-11964][table-runtime-blink] Fix hash table bugs URL: https://github.com/apache/flink/pull/10756#discussion_r363143078
########## File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/hashtable/BaseHybridHashTable.java ########## @@ -516,4 +511,10 @@ public static int hash(int hashCode, int level) { return code >= 0 ? code : -(code + 1); } + /** + * Partition level hash again, for avoid two layer hash conflict. + */ + static int partitionLevelHash(int hash) { + return hash ^ (hash >>> 16); + } Review comment: Thanks for involving this. > with most high bits equal to 0 Good point, but it should not. - In `BinaryHashTable`: HashCode is from murmurhash, it is good. - In `LongHybridHashTable`: HashCode is from `hashLong`, it is good too. `hash ^ (hash >>> 16)` is just from `HashMap.hash`, I think it is OK. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services